Class: Riffer::StreamEvents::TextDone
- Defined in:
- lib/riffer/stream_events/text_done.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(content, role: "assistant") ⇒ TextDone
constructor
A new instance of TextDone.
- #to_h ⇒ Object
Constructor Details
#initialize(content, role: "assistant") ⇒ TextDone
Returns a new instance of TextDone.
6 7 8 9 |
# File 'lib/riffer/stream_events/text_done.rb', line 6 def initialize(content, role: "assistant") super(role: role) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/riffer/stream_events/text_done.rb', line 4 def content @content end |
Instance Method Details
#to_h ⇒ Object
11 12 13 |
# File 'lib/riffer/stream_events/text_done.rb', line 11 def to_h {role: @role, content: @content} end |