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.
230 231 232 233 |
# File 'lib/durable/llm/providers/groq.rb', line 230 def initialize(delta) @role = delta['role'] @content = delta['content'] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
228 229 230 |
# File 'lib/durable/llm/providers/groq.rb', line 228 def content @content end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
228 229 230 |
# File 'lib/durable/llm/providers/groq.rb', line 228 def role @role end |
Instance Method Details
#to_s ⇒ Object
235 236 237 |
# File 'lib/durable/llm/providers/groq.rb', line 235 def to_s @content || '' end |