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.



89
90
91
# File 'lib/durable/llm/providers/cohere.rb', line 89

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

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



87
88
89
# File 'lib/durable/llm/providers/cohere.rb', line 87

def text
  @text
end

Instance Method Details

#to_sObject



93
94
95
# File 'lib/durable/llm/providers/cohere.rb', line 93

def to_s
  @text
end