nomic-ai / gpt4all

GPT4All: Run Local LLMs on Any Device. Open-source and available for commercial use.
https://nomic.ai/gpt4all
MIT License
70.62k stars 7.7k forks source link

Chats not retained if UI crash #2810

Open ygaeon opened 3 months ago

ygaeon commented 3 months ago

Bug Report

If the UI crashes while using it, all prompts and chats generated since starting the UI are lost when the UI is restarted. This is still an issue in release 3.1.1 (Linux).

The option "Save Chat Context" doesn't help with the issue (the UI has crashed).

The crashes happens while answers are generated, never while typing prompts etc.

This has been reported in comments before but I've not seen a clear separate issue.

727 have several comments

https://github.com/nomic-ai/gpt4all/issues/727#issuecomment-1572919469 GPT4All needs to persist each chat as soon as it's sent. I just lost hours of chats because my computer completely locked up after setting the batch size too high, so I had to do a hard restart. All the chats were gone after rebooting. I can't believe that this isn't the case by default.

https://github.com/nomic-ai/gpt4all/issues/727#issuecomment-1575938736 :( This is an amazing app and idea, but it's for demo purposes only at the moment. > I was working with Vicuna-13b for 6 hours today, opened a video file, and my PC suddenly got rebooted, and all history just disappeared//// heh

https://github.com/nomic-ai/gpt4all/issues/727#issuecomment-2211927051 I see this issue was closed but it's not clear what the fix was. I have lost many chats because even after weeks of being open and having dozens of chats, one crash and I find that all my chats for the last month are gone.

Closest clear issue reported in #1311 but it was closed by the author without any clear instructions on how to workaround (only referencing #727).

Steps to Reproduce

  1. Start the UI
  2. Write prompts and generate answers until UI crashes
  3. Start the UI again and the prompts/answers generated since last start are now gone.

Expected Behavior

@dannystaple put it perfectly in #1311: "The crash wouldn't be expected. However, also I would expect that chat sessions are retained to be continued when starting the app later."

Your Environment

cosmic-snow commented 3 months ago

Sorry that happened to you.

I can at least confirm it for you. All the chats get loaded at the start and saved again in the end. Ideally, it should not crash in between.

SINAPSA-IC commented 2 months ago

That's because the user has no Save Chat Now button to click on; it's like important operations like OK/Cancel/DoSomethingNow/ForgetIt are purely ignored due to hatred for buttons, it seems, or for symbols that would act like buttons. Anyway, Escape key acts both as Cancel and OK (it should not), so there we are however one spins it.

manyoso commented 2 weeks ago

We now save chats more eagerly than before. @cebtenzzre can we close this?

ygaeon commented 2 weeks ago

@manyoso In what version are "chats saved more eagerly"? I still use 3.4.1 and it's not saving after each generation as far as I can see .. (which would be necessary to retain chats if a crash occur mid-response-generation)

manyoso commented 2 weeks ago

@ygaeon i misspoke. we made some changes in 3.4.x that will enable us to fix this properly in future, but the fixes haven't been made yet so reopening