Class: OpenAI::Models
- Inherits:
-
Object
- Object
- OpenAI::Models
- Defined in:
- lib/openai/models.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Models
constructor
A new instance of Models.
- #list ⇒ Object
- #retrieve(id:) ⇒ Object
Constructor Details
#initialize(client:) ⇒ Models
Returns a new instance of Models.
3 4 5 |
# File 'lib/openai/models.rb', line 3 def initialize(client:) @client = client end |
Instance Method Details
#list ⇒ Object
7 8 9 |
# File 'lib/openai/models.rb', line 7 def list @client.get(path: "/models") end |
#retrieve(id:) ⇒ Object
11 12 13 |
# File 'lib/openai/models.rb', line 11 def retrieve(id:) @client.get(path: "/models/#{id}") end |