Class: Asimov::ApiV1::Embeddings
- Defined in:
- lib/asimov/api_v1/embeddings.rb
Overview
Class interface for API methods in the “/embeddings” URI subspace.
Instance Method Summary collapse
Methods inherited from Base
#check_for_api_error, #http_delete, #http_get, #http_streamed_download, #initialize, #json_post, #multipart_post, #wrap_response_with_error_handling
Constructor Details
This class inherits a constructor from Asimov::ApiV1::Base
Instance Method Details
#create(parameters:) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/asimov/api_v1/embeddings.rb', line 7 def create(parameters:) raise MissingRequiredParameterError.new(:model) unless parameters[:model] raise MissingRequiredParameterError.new(:input) unless parameters[:input] json_post(path: "/embeddings", parameters: parameters) end |