DocsGPT
DocsGPT copied to clipboard
index.faiss for reading: No such file or directory
Hi everyone,
I was trying to ask simple things about python docs and I got this error:
docsgpt-backend-1 | [2023-09-19 18:20:46 +0000] [7] [ERROR] Error handling request /stream
docsgpt-backend-1 | Traceback (most recent call last):
docsgpt-backend-1 | File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 136, in handle
docsgpt-backend-1 | self.handle_request(listener, req, client, addr)
docsgpt-backend-1 | File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 179, in handle_request
docsgpt-backend-1 | respiter = self.wsgi(environ, resp.start_response)
docsgpt-backend-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2552, in __call__
docsgpt-backend-1 | return self.wsgi_app(environ, start_response)
docsgpt-backend-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2532, in wsgi_app
docsgpt-backend-1 | response = self.handle_exception(e)
docsgpt-backend-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2529, in wsgi_app
docsgpt-backend-1 | response = self.full_dispatch_request()
docsgpt-backend-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request
docsgpt-backend-1 | rv = self.handle_user_exception(e)
docsgpt-backend-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
docsgpt-backend-1 | rv = self.dispatch_request()
docsgpt-backend-1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request
docsgpt-backend-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
docsgpt-backend-1 | File "/app/application/app.py", line 292, in stream
docsgpt-backend-1 | docsearch = get_docsearch(vectorstore, embeddings_key)
docsgpt-backend-1 | File "/app/application/app.py", line 152, in get_docsearch
docsgpt-backend-1 | docsearch = FAISS.load_local(vectorstore, openai_embeddings)
docsgpt-backend-1 | File "/usr/local/lib/python3.10/site-packages/langchain/vectorstores/faiss.py", line 696, in load_local
docsgpt-backend-1 | index = faiss.read_index(
docsgpt-backend-1 | File "/usr/local/lib/python3.10/site-packages/faiss/swigfaiss_avx2.py", line 9783, in read_index
docsgpt-backend-1 | return _swigfaiss_avx2.read_index(*args)
docsgpt-backend-1 | RuntimeError: Error in faiss::FileIOReader::FileIOReader(const char*) at /project/faiss/faiss/impl/io.cpp:67: Error: 'f' failed: could not open application/vectors/python/.project/3.11.1/openai_text-embedding-ada-002/index.faiss for reading: No such file or directory
Any help would be appreciated
Thanks
Looks like it didnt not successfully download vectors, after selecting them, try waiting for a minute or two and then try asking the question again please
That happens to me and it was solved moving the files to the root: index.faiss and index.pkl and this change: ` @@ -6,7 +6,7 @@ class FaissStore(BaseVectorStore):
def __init__(self, path, embeddings_key, docs_init=None):
super().__init__()
self.path = path
self.path = '' # override the path
`
That happens to me and it was solved moving the files to the root: index.faiss and index.pkl and this change: ` @@ -6,7 +6,7 @@ class FaissStore(BaseVectorStore):
def __init__(self, path, embeddings_key, docs_init=None): super().__init__() self.path = path self.path = '' # override the path`
Hello, I also encountered such a problem. Can you explain it in more detail? I didn’t understand it.
Where did you put your faiss files?