Issue with Boto3 and Flask App Handling Concurrent Conversations #4529
Unanswered
Lingeswaran-S
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using Boto3 in a Flask app, where each incoming request is handled as a separate thread. Each request creates its own Boto3 client instance.
However, I am facing an issue when handling multiple simultaneous conversations. Here's the scenario:
Conversation A requires tool T1, and Conversation B requires tool T2.
Instead of T1 being used for A and T2 for B, they are being swapped — T2 is sent to A, and T1 to B.
Additionally, when a new conversation starts after the above interactions, the same issue persists even if the new conversation does not require any tool assistance.
Why is this happening?
Despite each request having its own Boto3 client instance, it seems like the responses or context are getting mixed up. Can anyone provide insights or solutions to resolve this issue?
botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the Converse operation: Expected toolResult blocks at messages.4.content for the following Ids: tooluse_iIUm-dfYTDiWwuruwUIuKA, but found: tooluse_33PBxQL5RoqBivOIcHBHzg
Beta Was this translation helpful? Give feedback.
All reactions