大家好,
我尝试询问一些关于Python文档的简单问题,但遇到了这个错误:
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
如果有人能帮忙解决,将不胜感激。
谢谢!
4条答案
按热度按时间enxuqcxy1#
看起来在选择向量后,未能成功下载。请稍等一到两分钟,然后再尝试提出问题,谢谢。
eqfvzcg82#
这发生在我身上,问题是将文件移动到根目录:index.faiss 和 index.pkl,并进行了以下更改:
def init(self, path, embeddings_key, docs_init=None):
super().init()
self.path = path
self.path = '' # override the path
omhiaaxx3#
我遇到了同样的问题,并通过将文件移动到根目录:index.faiss和index.pkl以及这个更改解决了问题:`@@ -6,7 +6,7 @@ class FaissStore(BaseVectorStore):
`
你好,我也遇到了这样的问题。你能详细解释一下吗?我不太明白。
yebdmbv44#
你把Faiss文件放在哪里了?