Class: RSmolagent::FinalAnswerTool
Instance Attribute Summary
Attributes inherited from Tool
#description, #input_schema, #name
Instance Method Summary collapse
- #execute(args) ⇒ Object
-
#initialize ⇒ FinalAnswerTool
constructor
A new instance of FinalAnswerTool.
Methods inherited from Tool
Constructor Details
#initialize ⇒ FinalAnswerTool
Returns a new instance of FinalAnswerTool.
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/rsmolagent/tool.rb', line 56 def initialize super( name: "final_answer", description: "Use this to provide the final answer to the task", input_schema: { answer: { type: "string", description: "The final answer to the task" } } ) end |
Instance Method Details
#execute(args) ⇒ Object
69 70 71 |
# File 'lib/rsmolagent/tool.rb', line 69 def execute(args) args[:answer].to_s end |