Class: Durable::Llm::Providers::Google::GoogleChoice
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Google::GoogleChoice
- Defined in:
- lib/durable/llm/providers/google.rb
Overview
Represents a single candidate choice in a Google response.
Contains the message content from the candidate.
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(candidate) ⇒ GoogleChoice
constructor
A new instance of GoogleChoice.
- #to_s ⇒ Object
Constructor Details
#initialize(candidate) ⇒ GoogleChoice
Returns a new instance of GoogleChoice.
239 240 241 |
# File 'lib/durable/llm/providers/google.rb', line 239 def initialize(candidate) @message = GoogleMessage.new(candidate&.dig('content', 'parts')&.first) end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
237 238 239 |
# File 'lib/durable/llm/providers/google.rb', line 237 def @message end |
Instance Method Details
#to_s ⇒ Object
243 244 245 |
# File 'lib/durable/llm/providers/google.rb', line 243 def to_s @message.to_s end |