Error raised while calling invoke agent operation

0

Detailed Error: An error occurred (validationException) when calling the InvokeAgent operation: An error occurred when attempting to parse the model response with the default parser. Check your overridden prompt configurations or attach a lambda parser to handle the response. Then retry your request.

Below is the code used for invoking agent:

invoke_agent_params = { "agentAliasId": agentAliasId, "agentId": agentId, "inputText": query, "sessionId": conversationId } agent_response = bedrock_agent.invoke_agent(**invoke_agent_params) completion = "" for event in agent_response.get("completion"): chunk = event["chunk"] completion = completion + chunk["bytes"].decode()

3개 답변
1

ℹ️ This type of error usually occurs when the input parameters or configurations do not meet the expected format or when there is a misconfiguration in handling the response

💡 Since Bedrock Agent uses a default parser lambda function that isn't visible to you, the best approach to debug issues is to ensure that the data sent to the agent conforms exactly to the expected format. Add extensive logging before the API call to verify that all parameters are correct and complete.

profile picture
전문가
답변함 한 달 전
0

Check the output format from any Lambda functions, it needs to be in a specific format for the default parser to be able to parse it: https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html

AWS
Gillian
답변함 한 달 전
  • Hi @Gillian, we are not using any Parser Lambda function. After going through the link that you have shared, i have understood that Bedrock Agent uses a default parser lambda function which is not visible to us. Can you provide a way to debug the issues in that? Since we don't prefer to use a custom parser lambda function.

0

Hi @Gillian, we are not using any Parser Lambda function. After going through the link that you have shared, i have understood that Bedrock Agent uses a default parser lambda function which is not visible to us. Can you provide a way to debug the issues in that? Since we don't prefer to use a custom parser lambda function.

Jose
답변함 한 달 전
  • Can you give me more details on the Agent? Does it work if you invoke it through the "Test Agent" on the Agent page on the AWS Console? It provides a full set of traces so you can easily identify any issues.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠