Class: Durable::Llm::Providers::Google::GoogleChoice

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(candidate) ⇒ GoogleChoice

Returns a new instance of GoogleChoice.



228
229
230
# File 'lib/durable/llm/providers/google.rb', line 228

def initialize(candidate)
  @message = GoogleMessage.new(candidate&.dig('content', 'parts')&.first)
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



226
227
228
# File 'lib/durable/llm/providers/google.rb', line 226

def message
  @message
end

Instance Method Details

#to_sObject



232
233
234
# File 'lib/durable/llm/providers/google.rb', line 232

def to_s
  @message.to_s
end