Internal Server Exception to access Bedrock Knowledge Base

0

I wrote a code to access the Amazon Bedrock Knowledge Base and it worked successfully but now I am having the error below. How to fix it?

Exception occurred: An error occurred (InternalServerException) when calling the RetrieveAndGenerate operation (reached max retries: 4): Internal Server Exception

**Code: def askQuestion2(question): session = boto3.Session() bedrock_agent_runtime = session.client('bedrock-agent-runtime') request = { "input": {'text': question}, "retrieveAndGenerateConfiguration": { "type": "KNOWLEDGE_BASE", "knowledgeBaseConfiguration": { "knowledgeBaseId": "xxxxxxxxx", "modelArn": "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-v2" } }, }

1 個回答
0

Hi,

You may want to subscribe to this issue on Github: https://github.com/langchain-ai/langchain/issues/17170

They seem to experience same error as you

Best,

Didier

profile pictureAWS
專家
已回答 3 個月前
profile picture
專家
已審閱 22 天前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南