Class: Agents::Actions::AskForClarificationAction
- Inherits:
-
Agents::Action
- Object
- Agents::Action
- Agents::Actions::AskForClarificationAction
- Defined in:
- lib/actions/ask_for_clarification_action.rb
Instance Attribute Summary
Attributes inherited from Agents::Action
#arguments, #description, #examples, #name
Instance Method Summary collapse
-
#initialize ⇒ AskForClarificationAction
constructor
A new instance of AskForClarificationAction.
- #perform(request:, args:) ⇒ Object
Methods inherited from Agents::Action
Constructor Details
#initialize ⇒ AskForClarificationAction
Returns a new instance of AskForClarificationAction.
6 7 8 9 10 11 |
# File 'lib/actions/ask_for_clarification_action.rb', line 6 def initialize super(name: "ask_for_clarification", description: "Ask for clarification if the request is not clear, or you don't know how to help.", arguments: [ActionArgument.new(name: "question", type: "String", description: "The question, clarification, or additional information you need.")], ) end |
Instance Method Details
#perform(request:, args:) ⇒ Object
13 14 15 |
# File 'lib/actions/ask_for_clarification_action.rb', line 13 def perform(request:, args:) args.dig("question") end |