Open alexhmyang opened 1 year ago
+1
++1 兄台最后解决了咩
主要两步:
升级/server/requirements.txt
中 两个库的版本号为:
langchain==0.0.154
llama_index==0.6.15
/server/doc_util.py
中 line5 改为如下:
from llama_index import SimpleDirectoryReader, QuestionAnswerPrompt, LLMPredictor, GPTVectorStoreIndex as GPTSimpleVectorIndex
谢谢老哥
你们现在重新装 会报错,以前装的不会 ,应该是 python环境变化了
chatdoc-backend | Traceback (most recent call last): chatdoc-backend | File "/data/main.py", line 3, in
chatdoc-backend | from doc_util import Doc
chatdoc-backend | File "/data/doc_util.py", line 19, in
chatdoc-backend | CJKPDFReader = download_loader("CJKPDFReader")
chatdoc-backend | File "/usr/local/lib/python3.9/site-packages/llama_index/readers/download.py", line 125, in download_loader
chatdoc-backend | library = json.loads(library_raw_content)
chatdoc-backend | File "/usr/local/lib/python3.9/json/init.py", line 346, in loads
chatdoc-backend | return _default_decoder.decode(s)
chatdoc-backend | File "/usr/local/lib/python3.9/json/decoder.py", line 340, in decode
chatdoc-backend | raise JSONDecodeError("Extra data", s, end)
chatdoc-backend | json.decoder.JSONDecodeError: Extra data: line 1 column 4 (char 3)