Abhi5h3k / PrivateDocBot

📚 Local PDF-Integrated Chat Bot: Secure Conversations and Document Assistance with LLM-Powered Privacy
Apache License 2.0
64 stars 16 forks source link

Error in __cdecl faiss::FileIOReader::FileIOReade #2

Closed diouck closed 8 months ago

diouck commented 9 months ago

hello, I am trying to use your code however I encounter this error:

Error in __cdecl faiss::FileIOReader::FileIOReader(const char *) at D:\a\faiss-wheels\faiss-wheels\faiss\faiss\impl\io.cpp:68: Error: 'f' failed: could not open vectorstore\db_faiss\index.faiss for reading: No such file or directory

Have you encountered it and if so how to resolve it

Thank you

adamcodes716 commented 9 months ago

hello, I am trying to use your code however I encounter this error:

Error in __cdecl faiss::FileIOReader::FileIOReader(const char *) at D:\a\faiss-wheels\faiss-wheels\faiss\faiss\impl\io.cpp:68: Error: 'f' failed: could not open vectorstore\db_faiss\index.faiss for reading: No such file or directory

Have you encountered it and if so how to resolve it

Thank you

I am getting the same error. Has anyone figured out the issue?

adamcodes716 commented 9 months ago

I did make a little bit of progress on this. I thought I was using the required version of python only to discover that I had not restarted my command prompt. Once I restarted the command prompt and verified 3.11.0, I am now getting a different error. I have not modified anything after downloading. I did try to generate prisma by issuing "prisma generate" but that did not help.

File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\routing.py", line 677, in lifespan async with self.lifespan_context(app) as maybe_state: File "C:\Users\auser\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 204, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "", line 1231, in _handle_fromlist File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\prisma__init.py", line 45, in getattr__ raise RuntimeError( RuntimeError: The Client hasn't been generated yet, you must run prisma generate before you can use the client. See https://prisma-client-py.readthedocs.io/en/stable/reference/troubleshooting/#client-has-not-been-generated-yet

Yusuf-Demiryurek commented 8 months ago

Hello, the issue is related to the absence of the vector database. The script generates the database only if the folder PrivateDocBot\vectorstore\db_faiss is empty. However, when you clone this repository, there is a readme file in that folder. Please delete the readme.md file from this folder and try the process again.

diouck commented 8 months ago

Thanks for your feedback. It works but we get this error:

401 Client Error. (Request ID: Root=1-655b5fa8-697813fe6ffd92f0377a0ac0;50ab74ec-cd96-4507-a668-e98306085975)

Repository Not Found for url: https://huggingface.co/api/models/models/mistral-7b-openorca.Q4_K_M.gguf/revision/main. Please make sure you specified the correct repo_id and repo_type. If you are trying to access a private or gated repo, make sure you are authenticated. Invalid username or password.

Yusuf-Demiryurek commented 8 months ago

You're welcome, did you try to download the model by yourself from huggingface and put it in the models folder ?

Abhi5h3k commented 8 months ago

Thanks for your feedback. It works but we get this error:

401 Client Error. (Request ID: Root=1-655b5fa8-697813fe6ffd92f0377a0ac0;50ab74ec-cd96-4507-a668-e98306085975)

Repository Not Found for url: https://huggingface.co/api/models/models/mistral-7b-openorca.Q4_K_M.gguf/revision/main. Please make sure you specified the correct repo_id and repo_type. If you are trying to access a private or gated repo, make sure you are authenticated. Invalid username or password.

@diouck Make sure you have downloaded a model and placed it in the 'models' directory.

dir_structure

Abhi5h3k commented 8 months ago

hello, I am trying to use your code however I encounter this error:

Error in __cdecl faiss::FileIOReader::FileIOReader(const char *) at D:\a\faiss-wheels\faiss-wheels\faiss\faiss\impl\io.cpp:68: Error: 'f' failed: could not open vectorstore\db_faiss\index.faiss for reading: No such file or directory

Have you encountered it and if so how to resolve it

Thank you

PrivateDocBot\vectorstore\db_faiss needs to be empty; currently, there is a README file. Changes have been made in the new code to ignore this file. Thanks to @Yusuf-Demiryurek for pointing it out.