Class: Durable::Llm::Providers::Cohere::CohereChoice

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(generation) ⇒ CohereChoice

Returns a new instance of CohereChoice.



166
167
168
# File 'lib/durable/llm/providers/cohere.rb', line 166

def initialize(generation)
  @text = generation['text']
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



164
165
166
# File 'lib/durable/llm/providers/cohere.rb', line 164

def text
  @text
end

Instance Method Details

#to_sObject



170
171
172
# File 'lib/durable/llm/providers/cohere.rb', line 170

def to_s
  @text
end