When two users make a request for the streaming endpoint at the same time, user A's stream will contain chat engine events from user B's stream. This leaks user B's message to user A, if the events contain the message as a context query:
{
"type": "events",
"data": {
"title": "Retrieving context for query: 'Show me articles related to machine learning.\n'"
}
}
A workaround is to remove the event_handler from VercelStreamResponse. Ideally these chat engine events should only be emitted to the request that triggered them, but i am not sure if that is possible.
When two users make a request for the streaming endpoint at the same time, user A's stream will contain chat engine events from user B's stream. This leaks user B's message to user A, if the events contain the message as a context query:
{ "type": "events", "data": { "title": "Retrieving context for query: 'Show me articles related to machine learning.\n'" } }A workaround is to remove the
event_handlerfromVercelStreamResponse. Ideally these chat engine events should only be emitted to the request that triggered them, but i am not sure if that is possible.