Class: Candle::ToolCallResult
- Inherits:
-
Struct
- Object
- Struct
- Candle::ToolCallResult
- Defined in:
- lib/candle/tool.rb
Instance Attribute Summary collapse
-
#raw_response ⇒ Object
Returns the value of attribute raw_response.
-
#text_response ⇒ Object
Returns the value of attribute text_response.
-
#tool_calls ⇒ Object
Returns the value of attribute tool_calls.
-
#tool_results ⇒ Object
Returns the value of attribute tool_results.
Instance Method Summary collapse
Instance Attribute Details
#raw_response ⇒ Object
Returns the value of attribute raw_response
32 33 34 |
# File 'lib/candle/tool.rb', line 32 def raw_response @raw_response end |
#text_response ⇒ Object
Returns the value of attribute text_response
32 33 34 |
# File 'lib/candle/tool.rb', line 32 def text_response @text_response end |
#tool_calls ⇒ Object
Returns the value of attribute tool_calls
32 33 34 |
# File 'lib/candle/tool.rb', line 32 def tool_calls @tool_calls end |
#tool_results ⇒ Object
Returns the value of attribute tool_results
32 33 34 |
# File 'lib/candle/tool.rb', line 32 def tool_results @tool_results end |
Instance Method Details
#has_tool_calls? ⇒ Boolean
39 40 41 |
# File 'lib/candle/tool.rb', line 39 def has_tool_calls? tool_calls && !tool_calls.empty? end |
#success? ⇒ Boolean
43 44 45 |
# File 'lib/candle/tool.rb', line 43 def success? tool_results.all? { |r| r[:error].nil? } end |