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.
6 7 8 |
# File 'lib/riffer/stream_events/base.rb', line 6 def initialize(role: "assistant") @role = role end |
Instance Attribute Details
#role ⇒ Object (readonly)
Returns the value of attribute role.
4 5 6 |
# File 'lib/riffer/stream_events/base.rb', line 4 def role @role end |
Instance Method Details
#to_h ⇒ Object
10 11 12 |
# File 'lib/riffer/stream_events/base.rb', line 10 def to_h raise NotImplementedError, "Subclasses must implement #to_h" end |