Class: Asimov::ApiV1::Models
Overview
Class interface for API methods in the “/models” URI subspace.
Instance Method Summary collapse
-
#delete(model_id:) ⇒ Object
Deletes the model with the specified model_id.
-
#list ⇒ Object
Lists the models accessible to this combination of OpenAI API key and organization id.
-
#retrieve(model_id:) ⇒ Object
Retrieve information about the model with the specified model_id.
Methods inherited from Base
#http_delete, #http_get, #http_streamed_download, #initialize, #json_post, #multipart_post
Constructor Details
This class inherits a constructor from Asimov::ApiV1::Base
Instance Method Details
#delete(model_id:) ⇒ Object
Deletes the model with the specified model_id. Only works on models created via fine tuning.
34 35 36 |
# File 'lib/asimov/api_v1/models.rb', line 34 def delete(model_id:) http_delete(path: "#{URI_PREFIX}/#{model_id}") end |
#list ⇒ Object
Lists the models accessible to this combination of OpenAI API key and organization id.
14 15 16 |
# File 'lib/asimov/api_v1/models.rb', line 14 def list http_get(path: URI_PREFIX) end |
#retrieve(model_id:) ⇒ Object
Retrieve information about the model with the specified model_id.
24 25 26 |
# File 'lib/asimov/api_v1/models.rb', line 24 def retrieve(model_id:) http_get(path: "#{URI_PREFIX}/#{model_id}") end |