Class: Durable::Llm::Providers::Groq::GroqEmbeddingResponse
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Groq::GroqEmbeddingResponse
- Defined in:
- lib/durable/llm/providers/groq.rb
Overview
Response object for Groq embedding API responses.
Wraps embedding data and provides array access to the vector representation.
Instance Attribute Summary collapse
-
#embedding ⇒ Object
readonly
Returns the value of attribute embedding.
Instance Method Summary collapse
-
#initialize(data) ⇒ GroqEmbeddingResponse
constructor
A new instance of GroqEmbeddingResponse.
- #to_a ⇒ Object
Constructor Details
#initialize(data) ⇒ GroqEmbeddingResponse
Returns a new instance of GroqEmbeddingResponse.
269 270 271 |
# File 'lib/durable/llm/providers/groq.rb', line 269 def initialize(data) @embedding = data.dig('data', 0, 'embedding') end |
Instance Attribute Details
#embedding ⇒ Object (readonly)
Returns the value of attribute embedding.
267 268 269 |
# File 'lib/durable/llm/providers/groq.rb', line 267 def @embedding end |
Instance Method Details
#to_a ⇒ Object
273 274 275 |
# File 'lib/durable/llm/providers/groq.rb', line 273 def to_a @embedding end |