Class: OpenAI::Models

Inherits:
Object
  • Object
show all
Defined in:
lib/openai/models.rb

Instance Method Summary collapse

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

#listObject



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