Class: Durable::Llm::Providers::Groq::GroqStreamDelta

Inherits:
Object
  • Object
show all
Defined in:
lib/durable/llm/providers/groq.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject (readonly)

Returns the value of attribute content.



160
161
162
# File 'lib/durable/llm/providers/groq.rb', line 160

def content
  @content
end

#roleObject (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_sObject



167
168
169
# File 'lib/durable/llm/providers/groq.rb', line 167

def to_s
  @content || ''
end