-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Handle multiple user messages in a single request #26
Conversation
The PR tried to merge all the user messages and assistant messages into one. I am afraid that changes the order of the messages (in chat history) which may have impacts to the AI response. A user message can only be merged with the previous one if the previous one is with the same role. |
@daixba I refactored the implementation to not change the order. Changed to accept OpenAI-compliant input
|
Hi @ysekiy - Great to see progress on the fix for Issue #25 - I'm keen to try it as I've hit the same problem when trying to use the bedrock-access-gateway with cursor.sh (which sends multiple messages). |
@rstrahan environment
step1 : clone
step2:You can add
step3:create your own docker image and push it
step4:
You can push your CloudFormation template to your AWS account with |
@daixba |
@ysekiy |
Issue #25 : Error when including multiple user messages in a single request to /chat/completions API
Description of changes:
This pull request adds a new method
_reframe_multi_payloard
to handle multiple user messages in a single request to the /chat/completions API. The method converts the OpenAI format messages to the Bedrock conversational API format by aggregating all user messages into a single message with an array of contents.The method performs the following steps:
This change allows the application to handle multiple user messages in a single request, which was previously causing an error.