Class: Durable::Llm::Providers::Cohere::CohereEmbeddingResponse
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Cohere::CohereEmbeddingResponse
- Defined in:
- lib/durable/llm/providers/cohere.rb
Instance Attribute Summary collapse
-
#embedding ⇒ Object
readonly
Returns the value of attribute embedding.
Instance Method Summary collapse
-
#initialize(data) ⇒ CohereEmbeddingResponse
constructor
A new instance of CohereEmbeddingResponse.
- #to_a ⇒ Object
Constructor Details
#initialize(data) ⇒ CohereEmbeddingResponse
Returns a new instance of CohereEmbeddingResponse.
178 179 180 |
# File 'lib/durable/llm/providers/cohere.rb', line 178 def initialize(data) @embedding = data.dig('embeddings', 'float', 0) end |
Instance Attribute Details
#embedding ⇒ Object (readonly)
Returns the value of attribute embedding.
176 177 178 |
# File 'lib/durable/llm/providers/cohere.rb', line 176 def @embedding end |
Instance Method Details
#to_a ⇒ Object
182 183 184 |
# File 'lib/durable/llm/providers/cohere.rb', line 182 def to_a @embedding end |