Skip to content
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

Bugfix/Concurrent Chat Session #1497

Merged
merged 2 commits into from
Jan 15, 2024
Merged

Conversation

HenryHengZJ
Copy link
Contributor

Bug: when concurrent users are chatting with a flow, memory is mixed up:

Steps to reproduce:

1.) Have a simple conversation chain and memory with sessionId:

image

2.) Open the chat, and introduce your name as “Evan”

image

3.) Open the Share Chatbot (to imitate another session), and introduce yourself as “Henry”

image

4.) Now, here’s the importance step. Prepare the question in the chatbox first:

Henry’s session
image

Evan’s session
image

Then from the Share Chatbot (Henry’s session) page, quickly press enter to send

Switch to UI tab (Evan’s session), enter again to send

We are trying to simulate concurrent request

5.) Go to Redis Insight, observe the session:

Henry’s session
image

Evan’s session:
image

as you can see, Henry’s session messages got saved into Evan’s. Why? Because UI (Evan’s) is where I last entered “whats my name”

@HenryHengZJ
Copy link
Contributor Author

Fix: Change agent/chain to use RunnableSequence, this allow us to retrieve memory during runtime when .run() is called

# Conflicts:
#	packages/components/nodes/agents/OpenAIFunctionAgent/OpenAIFunctionAgent.ts
@HenryHengZJ HenryHengZJ merged commit b3d2d7c into main Jan 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant