Class: Durable::Llm::Providers::DeepSeek::DeepSeekStreamDelta
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::DeepSeek::DeepSeekStreamDelta
- Defined in:
- lib/durable/llm/providers/deepseek.rb
Overview
Stream delta wrapper for DeepSeek streaming
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) ⇒ DeepSeekStreamDelta
constructor
A new instance of DeepSeekStreamDelta.
- #to_s ⇒ Object
Constructor Details
#initialize(delta) ⇒ DeepSeekStreamDelta
Returns a new instance of DeepSeekStreamDelta.
219 220 221 222 |
# File 'lib/durable/llm/providers/deepseek.rb', line 219 def initialize(delta) @role = delta['role'] @content = delta['content'] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
217 218 219 |
# File 'lib/durable/llm/providers/deepseek.rb', line 217 def content @content end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
217 218 219 |
# File 'lib/durable/llm/providers/deepseek.rb', line 217 def role @role end |
Instance Method Details
#to_s ⇒ Object
224 225 226 |
# File 'lib/durable/llm/providers/deepseek.rb', line 224 def to_s @content || '' end |