Class: Durable::Llm::Providers::Google::GoogleEmbeddingResponse
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Google::GoogleEmbeddingResponse
- Defined in:
- lib/durable/llm/providers/google.rb
Overview
Response object for Google 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) ⇒ GoogleEmbeddingResponse
constructor
A new instance of GoogleEmbeddingResponse.
- #to_a ⇒ Object
Constructor Details
#initialize(data) ⇒ GoogleEmbeddingResponse
Returns a new instance of GoogleEmbeddingResponse.
314 315 316 |
# File 'lib/durable/llm/providers/google.rb', line 314 def initialize(data) @embedding = data.dig('embedding', 'values') end |
Instance Attribute Details
#embedding ⇒ Object (readonly)
Returns the value of attribute embedding.
312 313 314 |
# File 'lib/durable/llm/providers/google.rb', line 312 def @embedding end |
Instance Method Details
#to_a ⇒ Object
318 319 320 |
# File 'lib/durable/llm/providers/google.rb', line 318 def to_a @embedding end |