Class: Durable::Llm::Providers::Opencode::OpencodeStreamDelta
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Opencode::OpencodeStreamDelta
- Defined in:
- lib/durable/llm/providers/opencode.rb
Overview
Stream delta class for OpenCode API
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) ⇒ OpencodeStreamDelta
constructor
A new instance of OpencodeStreamDelta.
- #to_s ⇒ Object
Constructor Details
#initialize(delta) ⇒ OpencodeStreamDelta
Returns a new instance of OpencodeStreamDelta.
239 240 241 242 |
# File 'lib/durable/llm/providers/opencode.rb', line 239 def initialize(delta) @role = delta['role'] @content = delta['content'] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
237 238 239 |
# File 'lib/durable/llm/providers/opencode.rb', line 237 def content @content end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
237 238 239 |
# File 'lib/durable/llm/providers/opencode.rb', line 237 def role @role end |
Instance Method Details
#to_s ⇒ Object
244 245 246 |
# File 'lib/durable/llm/providers/opencode.rb', line 244 def to_s @content || '' end |