Class: Riffer::StreamEvents::TextDelta
- Defined in:
- lib/riffer/stream_events/text_delta.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") ⇒ TextDelta
constructor
A new instance of TextDelta.
- #to_h ⇒ Object
Constructor Details
#initialize(content, role: "assistant") ⇒ TextDelta
Returns a new instance of TextDelta.
7 8 9 10 |
# File 'lib/riffer/stream_events/text_delta.rb', line 7 def initialize(content, role: "assistant") super(role: role) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
5 6 7 |
# File 'lib/riffer/stream_events/text_delta.rb', line 5 def content @content end |
Instance Method Details
#to_h ⇒ Object
12 13 14 |
# File 'lib/riffer/stream_events/text_delta.rb', line 12 def to_h {role: @role, content: @content} end |