Class: Durable::Llm::Providers::Anthropic::AnthropicStreamChoice
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Anthropic::AnthropicStreamChoice
- Defined in:
- lib/durable/llm/providers/anthropic.rb
Overview
Represents a single choice in a streaming Anthropic response chunk.
Contains the delta (incremental content) for the choice.
Instance Attribute Summary collapse
-
#delta ⇒ Object
readonly
Returns the value of attribute delta.
Instance Method Summary collapse
-
#initialize(event) ⇒ AnthropicStreamChoice
constructor
A new instance of AnthropicStreamChoice.
- #to_s ⇒ Object
Constructor Details
#initialize(event) ⇒ AnthropicStreamChoice
347 348 349 |
# File 'lib/durable/llm/providers/anthropic.rb', line 347 def initialize(event) @delta = AnthropicStreamDelta.new(event['delta']) end |
Instance Attribute Details
#delta ⇒ Object (readonly)
Returns the value of attribute delta.
345 346 347 |
# File 'lib/durable/llm/providers/anthropic.rb', line 345 def delta @delta end |
Instance Method Details
#to_s ⇒ Object
351 352 353 |
# File 'lib/durable/llm/providers/anthropic.rb', line 351 def to_s @delta.to_s end |