Class: Durable::Llm::Providers::Fireworks::FireworksStreamDelta
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Fireworks::FireworksStreamDelta
- Defined in:
- lib/durable/llm/providers/fireworks.rb
Overview
Represents the incremental content delta in a streaming response.
Contains the role and text content of the delta.
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
Instance Method Summary collapse
-
#initialize(delta) ⇒ FireworksStreamDelta
constructor
A new instance of FireworksStreamDelta.
- #to_s ⇒ Object
Constructor Details
#initialize(delta) ⇒ FireworksStreamDelta
Returns a new instance of FireworksStreamDelta.
290 291 292 293 |
# File 'lib/durable/llm/providers/fireworks.rb', line 290 def initialize(delta) @role = delta['role'] @content = delta['content'] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
288 289 290 |
# File 'lib/durable/llm/providers/fireworks.rb', line 288 def content @content end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
288 289 290 |
# File 'lib/durable/llm/providers/fireworks.rb', line 288 def role @role end |
Instance Method Details
#to_s ⇒ Object
295 296 297 |
# File 'lib/durable/llm/providers/fireworks.rb', line 295 def to_s @content || '' end |