Class: ComposableAgents::AiAgents::Tools::AskUserTool
- Inherits:
-
Agents::Tool
- Object
- Agents::Tool
- ComposableAgents::AiAgents::Tools::AskUserTool
- Includes:
- Mixins::Logger
- Defined in:
- lib/composable_agents/ai_agents/tools/ask_user_tool.rb
Overview
Tool that is used to ask the user for some input
Instance Method Summary collapse
-
#initialize(agent) ⇒ AskUserTool
constructor
Constructor.
-
#perform(_tool_context, question:) ⇒ String
Perform the tool's action.
Methods included from Mixins::Logger
Constructor Details
#initialize(agent) ⇒ AskUserTool
Constructor
21 22 23 24 |
# File 'lib/composable_agents/ai_agents/tools/ask_user_tool.rb', line 21 def initialize(agent) super() @agent = agent end |
Instance Method Details
#perform(_tool_context, question:) ⇒ String
Perform the tool's action. This is called by ai-agents when the model requires it.
32 33 34 |
# File 'lib/composable_agents/ai_agents/tools/ask_user_tool.rb', line 32 def perform(_tool_context, question:) @agent.ask(question) end |