Class: Durable::Llm::Providers::Huggingface::HuggingfaceEmbeddingResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/durable/llm/providers/huggingface.rb

Overview

Response wrapper for Hugging Face embedding API responses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ HuggingfaceEmbeddingResponse

Returns a new instance of HuggingfaceEmbeddingResponse.



158
159
160
# File 'lib/durable/llm/providers/huggingface.rb', line 158

def initialize(data)
  @embedding = data
end

Instance Attribute Details

#embeddingObject (readonly)

Returns the value of attribute embedding.



156
157
158
# File 'lib/durable/llm/providers/huggingface.rb', line 156

def embedding
  @embedding
end

Instance Method Details

#to_aObject



162
163
164
# File 'lib/durable/llm/providers/huggingface.rb', line 162

def to_a
  @embedding
end