Class: Durable::Llm::Providers::Huggingface::HuggingfaceChoice
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Huggingface::HuggingfaceChoice
- Defined in:
- lib/durable/llm/providers/huggingface.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(choice) ⇒ HuggingfaceChoice
constructor
A new instance of HuggingfaceChoice.
- #to_s ⇒ Object
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
#text ⇒ Object (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_s ⇒ Object
87 88 89 |
# File 'lib/durable/llm/providers/huggingface.rb', line 87 def to_s @text end |