Class: Durable::Llm::Providers::OpenAI::OpenAIEmbeddingResponse
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::OpenAI::OpenAIEmbeddingResponse
- Defined in:
- lib/durable/llm/providers/openai.rb
Instance Attribute Summary collapse
-
#embedding ⇒ Object
readonly
Returns the value of attribute embedding.
Instance Method Summary collapse
-
#initialize(data) ⇒ OpenAIEmbeddingResponse
constructor
A new instance of OpenAIEmbeddingResponse.
- #to_a ⇒ Object
Constructor Details
#initialize(data) ⇒ OpenAIEmbeddingResponse
Returns a new instance of OpenAIEmbeddingResponse.
209 210 211 |
# File 'lib/durable/llm/providers/openai.rb', line 209 def initialize(data) @embedding = data.dig('data', 0, 'embedding') end |
Instance Attribute Details
#embedding ⇒ Object (readonly)
Returns the value of attribute embedding.
207 208 209 |
# File 'lib/durable/llm/providers/openai.rb', line 207 def @embedding end |
Instance Method Details
#to_a ⇒ Object
213 214 215 |
# File 'lib/durable/llm/providers/openai.rb', line 213 def to_a @embedding end |