Class: Durable::Llm::Providers::Mistral::MistralEmbeddingResponse
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Mistral::MistralEmbeddingResponse
- Defined in:
- lib/durable/llm/providers/mistral.rb
Overview
Response object for Mistral AI embedding API responses
Contains the embedding vector data from Mistral AI’s embedding models.
Instance Attribute Summary collapse
-
#embedding ⇒ Object
readonly
Returns the value of attribute embedding.
Instance Method Summary collapse
-
#initialize(data) ⇒ MistralEmbeddingResponse
constructor
Initializes a new embedding response object.
-
#to_a ⇒ Array<Float>
Returns the embedding as an array.
Constructor Details
#initialize(data) ⇒ MistralEmbeddingResponse
Initializes a new embedding response object
362 363 364 |
# File 'lib/durable/llm/providers/mistral.rb', line 362 def initialize(data) = data.dig('data', 0, 'embedding') end |
Instance Attribute Details
#embedding ⇒ Object (readonly)
Returns the value of attribute embedding.
357 358 359 |
# File 'lib/durable/llm/providers/mistral.rb', line 357 def end |
Instance Method Details
#to_a ⇒ Array<Float>
Returns the embedding as an array
369 370 371 |
# File 'lib/durable/llm/providers/mistral.rb', line 369 def to_a end |