Class: OmniAgent::Providers::Response
- Inherits:
-
Object
- Object
- OmniAgent::Providers::Response
- Defined in:
- lib/omni_agent/providers/response.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#raw_response ⇒ Object
readonly
Returns the value of attribute raw_response.
-
#tool_calls ⇒ Object
readonly
Returns the value of attribute tool_calls.
Instance Method Summary collapse
-
#initialize(content:, tool_calls: [], raw_response: nil) ⇒ Response
constructor
A new instance of Response.
- #tool_calls? ⇒ Boolean
Constructor Details
#initialize(content:, tool_calls: [], raw_response: nil) ⇒ Response
Returns a new instance of Response.
6 7 8 9 10 |
# File 'lib/omni_agent/providers/response.rb', line 6 def initialize(content:, tool_calls: [], raw_response: nil) @content = content @tool_calls = tool_calls || [] @raw_response = raw_response end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/omni_agent/providers/response.rb', line 4 def content @content end |
#raw_response ⇒ Object (readonly)
Returns the value of attribute raw_response.
4 5 6 |
# File 'lib/omni_agent/providers/response.rb', line 4 def raw_response @raw_response end |
#tool_calls ⇒ Object (readonly)
Returns the value of attribute tool_calls.
4 5 6 |
# File 'lib/omni_agent/providers/response.rb', line 4 def tool_calls @tool_calls end |
Instance Method Details
#tool_calls? ⇒ Boolean
12 13 14 |
# File 'lib/omni_agent/providers/response.rb', line 12 def tool_calls? @tool_calls.any? end |