Class: Crimson::Message::Base Abstract
- Inherits:
-
Object
- Object
- Crimson::Message::Base
- Defined in:
- lib/crimson/message.rb
Overview
This class is abstract.
Base class for all message types.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#role ⇒ String
readonly
The role name (e.g. “system”, “user”, “assistant”, “tool”).
Instance Method Summary collapse
-
#initialize(role) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(role) ⇒ Base
Returns a new instance of Base.
15 16 17 |
# File 'lib/crimson/message.rb', line 15 def initialize(role) @role = role end |
Instance Attribute Details
#role ⇒ String (readonly)
Returns the role name (e.g. “system”, “user”, “assistant”, “tool”).
12 13 14 |
# File 'lib/crimson/message.rb', line 12 def role @role end |