Class: Agents::Actions::AskForClarificationAction

Inherits:
Agents::Action show all
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

Methods inherited from Agents::Action

#for_prompt

Constructor Details

#initializeAskForClarificationAction

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