Class: Rubyagents::ChatMessage
- Inherits:
-
Data
- Object
- Data
- Rubyagents::ChatMessage
- Defined in:
- lib/rubyagents/model.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#token_usage ⇒ Object
readonly
Returns the value of attribute token_usage.
-
#tool_calls ⇒ Object
readonly
Returns the value of attribute tool_calls.
Instance Method Summary collapse
-
#initialize(role:, content:, token_usage: nil, tool_calls: nil) ⇒ ChatMessage
constructor
A new instance of ChatMessage.
Constructor Details
#initialize(role:, content:, token_usage: nil, tool_calls: nil) ⇒ ChatMessage
Returns a new instance of ChatMessage.
36 37 38 |
# File 'lib/rubyagents/model.rb', line 36 def initialize(role:, content:, token_usage: nil, tool_calls: nil) super end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content
35 36 37 |
# File 'lib/rubyagents/model.rb', line 35 def content @content end |
#role ⇒ Object (readonly)
Returns the value of attribute role
35 36 37 |
# File 'lib/rubyagents/model.rb', line 35 def role @role end |
#token_usage ⇒ Object (readonly)
Returns the value of attribute token_usage
35 36 37 |
# File 'lib/rubyagents/model.rb', line 35 def token_usage @token_usage end |
#tool_calls ⇒ Object (readonly)
Returns the value of attribute tool_calls
35 36 37 |
# File 'lib/rubyagents/model.rb', line 35 def tool_calls @tool_calls end |