Class: Durable::Llm::Providers::Anthropic::AnthropicStreamDelta
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Anthropic::AnthropicStreamDelta
- Defined in:
- lib/durable/llm/providers/anthropic.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(delta) ⇒ AnthropicStreamDelta
constructor
A new instance of AnthropicStreamDelta.
- #to_s ⇒ Object
Constructor Details
#initialize(delta) ⇒ AnthropicStreamDelta
Returns a new instance of AnthropicStreamDelta.
156 157 158 159 |
# File 'lib/durable/llm/providers/anthropic.rb', line 156 def initialize(delta) @type = delta['type'] @text = delta['text'] end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
154 155 156 |
# File 'lib/durable/llm/providers/anthropic.rb', line 154 def text @text end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
154 155 156 |
# File 'lib/durable/llm/providers/anthropic.rb', line 154 def type @type end |
Instance Method Details
#to_s ⇒ Object
161 162 163 |
# File 'lib/durable/llm/providers/anthropic.rb', line 161 def to_s @text || '' end |