Class: Durable::Llm::Providers::DeepSeek::DeepSeekChoice

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

Overview

Choice wrapper for DeepSeek response choices

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(choice) ⇒ DeepSeekChoice

Returns a new instance of DeepSeekChoice.



150
151
152
153
# File 'lib/durable/llm/providers/deepseek.rb', line 150

def initialize(choice)
  @message = DeepSeekMessage.new(choice['message'])
  @finish_reason = choice['finish_reason']
end

Instance Attribute Details

#finish_reasonObject (readonly)

Returns the value of attribute finish_reason.



148
149
150
# File 'lib/durable/llm/providers/deepseek.rb', line 148

def finish_reason
  @finish_reason
end

#messageObject (readonly)

Returns the value of attribute message.



148
149
150
# File 'lib/durable/llm/providers/deepseek.rb', line 148

def message
  @message
end

Instance Method Details

#to_sObject



155
156
157
# File 'lib/durable/llm/providers/deepseek.rb', line 155

def to_s
  @message.to_s
end