Class: Openai::Models
- Inherits:
-
Resource::Api
- Object
- Resource::Api
- Openai::Models
- Defined in:
- lib/openai/models.rb
Instance Attribute Summary
Attributes inherited from Resource::Api
#connection, #data, #path, #response
Instance Method Summary collapse
-
#initialize ⇒ Models
constructor
A new instance of Models.
- #request ⇒ Object
Constructor Details
#initialize ⇒ Models
Returns a new instance of Models.
5 6 7 8 |
# File 'lib/openai/models.rb', line 5 def initialize @path = "/v1/models" super() end |
Instance Method Details
#request ⇒ Object
10 11 12 13 |
# File 'lib/openai/models.rb', line 10 def request @response = @connection.get(path: @path) @data = ::Openai::Mapper::Models.from_json(super()) end |