Class: Durable::Llm::Providers::Groq::GroqStreamDelta
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Groq::GroqStreamDelta
- Defined in:
- lib/durable/llm/providers/groq.rb
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) ⇒ GroqStreamDelta
constructor
A new instance of GroqStreamDelta.
- #to_s ⇒ Object
Constructor Details
#initialize(delta) ⇒ GroqStreamDelta
Returns a new instance of GroqStreamDelta.
162 163 164 165 |
# File 'lib/durable/llm/providers/groq.rb', line 162 def initialize(delta) @role = delta['role'] @content = delta['content'] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
160 161 162 |
# File 'lib/durable/llm/providers/groq.rb', line 160 def content @content end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
160 161 162 |
# File 'lib/durable/llm/providers/groq.rb', line 160 def role @role end |
Instance Method Details
#to_s ⇒ Object
167 168 169 |
# File 'lib/durable/llm/providers/groq.rb', line 167 def to_s @content || '' end |