nomic-ai / gpt4all

gpt4all: run open-source LLMs anywhere

Home Page:https://gpt4all.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question - Writing into the embeddings file for LocalDocs while running multiple instances of GPT4All

SINAPSA-IC opened this issue · comments

Hello.

Yet again, didn't know where to place this, so to speak, as it is more of a Question than a Discussion... for me, at least.

Given that

  • GPT4Alll v2.7.5, can run in multiple instances, each one with its own LLM being Loaded

  • the conversation may require the use of Local Documents

  • the embeddings database is first being (re)created by the first instance that was started

  • and this process can still be running when another instance of the program is started, with it also trying to Index the Local Documents

  • does the possibility exist that the embeddings file would get corrupted, with two or more instances of the program trying to write the same file? or:

  • is the embeddings file locked for writing, once an instance starts writing into it?

  • as such, is it possible-probable that the LocalDocs functionality would get broken while running multiple program instances?

GPT4All is not designed to have multiple instances running in parallel. I don't think multi-window or at least parallel chats are out of the question, but they are not currently implemented. We should implement a way for GPT4All to detect if it is already running (on Windows and Linux - macOS already prevents this AFAIK) and at least prevent another process from being started.