-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Bug]: Saved conversation structure collapse #4761
Comments
PS, i had updated to latest version on local a few days ago. but the hugging face hasn't been updated (unless it does it automatically when i rebuild). they both present the same issue. |
Also having this issue — not sure if it's number of messages or chat lengths, but I noticed it kicking in with one of my chats every time it hit 20 messages or so. The collapse seems to happen if I export or fork the chat but not in the original thread. Although what does tend to happen in the original thread (past another length threshold) is #3813, likely related. I also don't notice any corruption that happens in the actual JSON, say if I export the original chat. |
Continuing the conversation at #4772 (comment) After some investigation, I found that the message list is sorted by LibreChat/api/models/Message.js Lines 253 to 259 in 7d5be68
But after forking, all the newly created messages will have the My guess is that mongodb only guanrantees the insertion order when qeurying small number of objects, hence the magic number 16. |
Fantastic work @xyqyear - and I realize I had a similar bug in a different project due to createdAt in mongodb... |
Unfortunately it's a backend issue. The folding conversations can be fixed, but it would be a lot of overhead to fix the issue retroactively. Maybe I can make a script to fix specific conversations? |
yes please! 🙏 |
What happened?
I had a long conversation saved last week. That conversation had occasional branching where i edited my questions. Never more than a couple of branches wide, max 3 or 4. Now it is showing as if the entire conversation has one message at the trunk, and 42 branches on the same level. When i click on the < and > to navigate between these branches, it actually changes the root message, which is sometimes mine sometimes the LLM's answer!
I tried on both local / running on docker and on hugginface. They're both using the same DB so i guess there is corruption at the DB level. WHICH IS VERY SCARY.
Steps to Reproduce
I noticed this today I tried to find a message in that conversation so searched for a term in the search bar, it listed the relevant messages and the correct conversation. When I clicked on it, I found that the normal tree structure of the conversation had totally collapsed into a single trunk with 42 branches.
What browsers are you seeing the problem on?
Chrome
Relevant log output
The log shows 200 messages loaded. but i don't see them except by navigating using the < 40/42 > prompt paginator.
Screenshots
Code of Conduct
The text was updated successfully, but these errors were encountered: