Class: Riffer::StreamEvents::Base
- Inherits:
-
Object
- Object
- Riffer::StreamEvents::Base
- Defined in:
- lib/riffer/stream_events/base.rb
Instance Attribute Summary collapse
-
#role ⇒ Object
readonly
Returns the value of attribute role.
Instance Method Summary collapse
-
#initialize(role: "assistant") ⇒ Base
constructor
A new instance of Base.
- #to_h ⇒ Object
Constructor Details
#initialize(role: "assistant") ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/riffer/stream_events/base.rb', line 7 def initialize(role: "assistant") @role = role end |
Instance Attribute Details
#role ⇒ Object (readonly)
Returns the value of attribute role.
5 6 7 |
# File 'lib/riffer/stream_events/base.rb', line 5 def role @role end |
Instance Method Details
#to_h ⇒ Object
11 12 13 |
# File 'lib/riffer/stream_events/base.rb', line 11 def to_h raise NotImplementedError, "Subclasses must implement #to_h" end |