aws-samples / amazon-bedrock-workshop

This is a workshop designed for Amazon Bedrock a foundational model service.
https://catalog.us-east-1.prod.workshops.aws/workshops/a4bdb007-5600-4368-81c5-ff5b4154f518/en-US/20-intro
MIT No Attribution
1.39k stars 592 forks source link

Claude Chatbot Error #114

Closed barr-code closed 10 months ago

barr-code commented 10 months ago

When executing the code under Chatbot using prompt template (Langchain) in the 00_Chatbot_Claude.ipynb, an error occurs because the prompt's chat history contains Human:, confusing Claude.

The human prefix for the chat history memory needs to be updated to be something other than Human.

barr-code commented 10 months ago

I opened this PR to address this issue: https://github.com/aws-samples/amazon-bedrock-workshop/pull/115

aarora79 commented 10 months ago

Hi @barr-code thank you for looking into this. Your fix does address the issue but this is also fixed in the next langchain version, so this workshop is currently using langchain==0.0.308, we need to upgrade to langchain==0.0.309. I verified that doing that fixes this issue without any code change in this notebook. Still, thank you for debugging this.

aarora79 commented 10 months ago

This is now fixed via https://github.com/aws-samples/amazon-bedrock-workshop/pull/120.