Class: ActiveMcp::Message::Text
- Inherits:
-
Object
- Object
- ActiveMcp::Message::Text
- Defined in:
- lib/active_mcp/message/text.rb
Instance Method Summary collapse
-
#initialize(role:, text:) ⇒ Text
constructor
A new instance of Text.
- #to_h ⇒ Object
Constructor Details
#initialize(role:, text:) ⇒ Text
4 5 6 7 |
# File 'lib/active_mcp/message/text.rb', line 4 def initialize(role:, text:) @role = role @text = text end |
Instance Method Details
#to_h ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/active_mcp/message/text.rb', line 9 def to_h { role: @role, content: { type: "text", text: @text } } end |