Class: Durable::Llm::Providers::DeepSeek::DeepSeekStreamDelta

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

Overview

Stream delta wrapper for DeepSeek streaming

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject (readonly)

Returns the value of attribute content.



217
218
219
# File 'lib/durable/llm/providers/deepseek.rb', line 217

def content
  @content
end

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



224
225
226
# File 'lib/durable/llm/providers/deepseek.rb', line 224

def to_s
  @content || ''
end