Class: Chatpdf::Message
- Inherits:
-
Object
- Object
- Chatpdf::Message
- Defined in:
- lib/chatpdf/message.rb
Instance Method Summary collapse
-
#initialize(content, role: "user") ⇒ Message
constructor
A new instance of Message.
- #to_h ⇒ Object
Constructor Details
#initialize(content, role: "user") ⇒ Message
Returns a new instance of Message.
3 4 5 6 |
# File 'lib/chatpdf/message.rb', line 3 def initialize(content, role: "user") @content = content @role = role end |
Instance Method Details
#to_h ⇒ Object
8 9 10 11 12 13 |
# File 'lib/chatpdf/message.rb', line 8 def to_h { role: @role, content: @content, } end |