Class: Durable::Llm::Providers::Together::TogetherStreamDelta
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Together::TogetherStreamDelta
- Defined in:
- lib/durable/llm/providers/together.rb
Overview
Represents a delta in streaming responses.
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) ⇒ TogetherStreamDelta
constructor
Initializes a stream delta.
-
#to_s ⇒ String
Converts to string.
Constructor Details
#initialize(delta) ⇒ TogetherStreamDelta
Initializes a stream delta.
329 330 331 332 |
# File 'lib/durable/llm/providers/together.rb', line 329 def initialize(delta) @role = delta['role'] @content = delta['content'] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
324 325 326 |
# File 'lib/durable/llm/providers/together.rb', line 324 def content @content end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
324 325 326 |
# File 'lib/durable/llm/providers/together.rb', line 324 def role @role end |
Instance Method Details
#to_s ⇒ String
Converts to string.
337 338 339 |
# File 'lib/durable/llm/providers/together.rb', line 337 def to_s @content || '' end |