I get this error when calling from laravel. where can I find the versions in the Agent. I do have two different version
Request:
$result = $this->bedrockAgentClient->associateAgentKnowledgeBase([
'agentId' => '4EG1ETD7H4', // REQUIRED
'agentVersion' => 'Version 3', // REQUIRED
'description' => 'Query knowledgebase if enabled', // REQUIRED
'knowledgeBaseId' => 'FG0TYJOWZ5', // REQUIRED
'knowledgeBaseState' => 'ENABLED'
]);
Error Response:
{
"error": "Error executing "AssociateAgentKnowledgeBase" on "https://bedrock-agent.us-east-1.amazonaws.com/agents/4EG1ETD7H4/agentversions/Version%203/knowledgebases/"; AWS HTTP error: Client error: PUT https://bedrock-agent.us-east-1.amazonaws.com/agents/4EG1ETD7H4/agentversions/Version%203/knowledgebases/
resulted in a 400 Bad Request
response:\n{"message":"2 validation errors detected: Value 'Version 3' at 'agentVersion' failed to satisfy constraint: Member must (truncated...)\n ValidationException (client): 2 validation errors detected: Value 'Version 3' at 'agentVersion' failed to satisfy constraint: Member must satisfy regular expression pattern: DRAFT; Value 'Version 3' at 'agentVersion' failed to satisfy constraint: Member must have length less than or equal to 5 - {"message":"2 validation errors detected: Value 'Version 3' at 'agentVersion' failed to satisfy constraint: Member must satisfy regular expression pattern: DRAFT; Value 'Version 3' at 'agentVersion' failed to satisfy constraint: Member must have length less than or equal to 5"}"
}
Thanks very much Osvaldo. I'll try that out. Appreciate your response!!