Class: MistralModels::EmbeddingResponse
- Inherits:
-
Object
- Object
- MistralModels::EmbeddingResponse
- Defined in:
- lib/mistral_rb/response_models.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Instance Method Summary collapse
-
#initialize(response_hash) ⇒ EmbeddingResponse
constructor
A new instance of EmbeddingResponse.
Constructor Details
#initialize(response_hash) ⇒ EmbeddingResponse
Returns a new instance of EmbeddingResponse.
36 37 38 39 40 41 42 |
# File 'lib/mistral_rb/response_models.rb', line 36 def initialize(response_hash) @id = response_hash["id"] @object = response_hash["object"] @data = response_hash["data"].map { || Embedding.new() } @model = response_hash["model"] @usage = response_hash["usage"] end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
34 35 36 |
# File 'lib/mistral_rb/response_models.rb', line 34 def data @data end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
34 35 36 |
# File 'lib/mistral_rb/response_models.rb', line 34 def id @id end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
34 35 36 |
# File 'lib/mistral_rb/response_models.rb', line 34 def model @model end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
34 35 36 |
# File 'lib/mistral_rb/response_models.rb', line 34 def object @object end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
34 35 36 |
# File 'lib/mistral_rb/response_models.rb', line 34 def usage @usage end |