2 個答案
- 最新
- 最多得票
- 最多評論
0
The answer about using the Action Group was in the right direction, however, it was missing some details. After some trial and error, I discovered that you need to add another action group to the agent, but it has to have the following details to enable the user input:
agent.add_action_group(
action_group_name = "UserInputAction",
action_group_state="ENABLED",
parent_action_group_signature="AMAZON.UserInput"
)
已回答 10 天前
0
Hi There
This is set in the Action Group. See https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html#bedrock-agent_CreateAgentActionGroup-request-parentActionGroupSignature
parentActionGroupSignature
To allow your agent to request the user for additional information when trying to complete a task, set this field to AMAZON.UserInput. You must leave the description, apiSchema, and actionGroupExecutor fields blank for this action group.
During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information.
Type: String
Valid Values: AMAZON.UserInput
Required: No
相關內容
- AWS 官方已更新 2 年前
@Matt-B, Thank you for your prompt answer. I'm still trying to understand how do I pass this
AMAZON.UserInput
? It is not a string ("AMAZON.UserInput"
) and I can't find where it is defined to include it in my CDK code.