mirror of
https://github.com/run-llama/create-llama.git
synced 2026-07-16 11:04:26 -04:00
Messages leak to other users #113
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Tetr4 on GitHub (Jan 13, 2025).
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:
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.@leehuwuj commented on GitHub (Jan 15, 2025):
Hi @Tetr4 , How did you run the API? Theoretically, if you start the FastAPI app with Uvicorn, each user request is handled by a single worker, so there should be no data race.
@Tetr4 commented on GitHub (Jan 18, 2025):
@leehuwuj Ah sorry my bad, I was still testing with a project that was generated from an old template 🤦 This was fixed by the event handler changes in #260 and I can confirm it does not happen in new projects. I will close this issue 🙂