Class: Durable::Llm::Providers::Opencode::OpencodeEmbeddingResponse

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

Overview

Embedding response class for OpenCode API

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ OpencodeEmbeddingResponse

Returns a new instance of OpencodeEmbeddingResponse.



211
212
213
# File 'lib/durable/llm/providers/opencode.rb', line 211

def initialize(data)
  @embedding = data.dig('data', 0, 'embedding')
end

Instance Attribute Details

#embeddingObject (readonly)

Returns the value of attribute embedding.



209
210
211
# File 'lib/durable/llm/providers/opencode.rb', line 209

def embedding
  @embedding
end

Instance Method Details

#to_aObject



215
216
217
# File 'lib/durable/llm/providers/opencode.rb', line 215

def to_a
  @embedding
end