Description of changes:
I put the chat history at the beginning of the prompt instead of in the middle.
The order of the history had to be changed because the Bedrock API expects to see alternating Human:/Assistant: lines for Claude. Without this change, the first query would work, but subsequent queries would generate an error from the Bedrock API:
ValueError: Error: Prompt must alternate between '
Human:' and '
Assistant:'.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
*Issue #, if available:This also fixes issue #45
Description of changes: I put the chat history at the beginning of the prompt instead of in the middle.
The order of the history had to be changed because the Bedrock API expects to see alternating Human:/Assistant: lines for Claude. Without this change, the first query would work, but subsequent queries would generate an error from the Bedrock API:
ValueError: Error: Prompt must alternate between '
Human:' and '
Assistant:'.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.