Bedrock Agent - Setting User Input parameter through the API

0

When creating or updating an Agent in Bedrock through the management console, you have the option to configure the User Input option ("Select whether the agent can prompt additional information from the user when it does not have enough information to respond to an utterance."). However, when you create an Agent through the API, or CDK (CloudFormation), this option is not available and the default value is False.

Is there a way to modify the default value to True through the service API?

2 Antworten
0
Akzeptierte Antwort

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"
        )
MLGuy
beantwortet vor 10 Tagen
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

profile pictureAWS
EXPERTE
Matt-B
beantwortet vor einem Monat
profile picture
EXPERTE
überprüft vor einem Monat
  • @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.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen