Class: Durable::Llm::Providers::Huggingface::HuggingfaceChoice

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(choice) ⇒ HuggingfaceChoice

Returns a new instance of HuggingfaceChoice.



83
84
85
# File 'lib/durable/llm/providers/huggingface.rb', line 83

def initialize(choice)
  @text = choice['generated_text']
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



81
82
83
# File 'lib/durable/llm/providers/huggingface.rb', line 81

def text
  @text
end

Instance Method Details

#to_sObject



87
88
89
# File 'lib/durable/llm/providers/huggingface.rb', line 87

def to_s
  @text
end