Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
7.13k stars 935 forks source link

Users are getting responses to questions asked by other users #733

Closed tituslhy closed 2 months ago

tituslhy commented 9 months ago

Hello!

I've developed a simple chainlit application using this link (https://docs.chainlit.io/integrations/llama-index) except that I'm using LLaMA2 instead of ChatGPT. The thing is when I have multiple users using the tool at the same time, they get responses to questions asked by other users instead of their own.

For e.g., user A asks "How do I troubleshoot issue A?" but gets the response to user B's question on "What are the main steps to implement solution B?" User A eventually gets a reply as well to his own question.

How do I fix this?

willydouhard commented 9 months ago

Did you instantiate one agent for all users ? Would have to look at the code to help

tituslhy commented 9 months ago

Oh sure! I just deployed the cookbook's code on a server for multiple users to play with. I'm thinking I should just store the "response_message = cl.Message(content="")" as a cl.user_session variable at the beginning of @cl.on_message to solve this problem.

dokterbob commented 2 months ago

Closed due to inactivity.