GaiZhenbiao / ChuanhuChatGPT

GUI for ChatGPT API and many LLMs. Supports agents, file-based QA, GPT finetuning and query with web search. All with a neat UI.
https://huggingface.co/spaces/JohnSmith9982/ChuanhuChatGPT
GNU General Public License v3.0
15.07k stars 2.28k forks source link

[本地部署]: 本地部署完成后,上传文件报错 #1090

Open KrystalandBarry opened 3 months ago

KrystalandBarry commented 3 months ago

是否已存在现有反馈与解答?

是否是一个代理配置相关的疑问?

错误描述

复现操作

本地部署完成后,上传文件报错 image

错误日志

100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2809.31it/s]
Traceback (most recent call last):
  File "/Users/dingtao/work/hpr/ai/code/ChuanhuChatGPT/modules/models/base_model.py", line 412, in handle_file_upload
    construct_index(self.api_key, file_src=files)
  File "/Users/dingtao/work/hpr/ai/code/ChuanhuChatGPT/modules/index_func.py", line 133, in construct_index
    raise Exception(i18n("没有找到任何支持的文档。"))
Exception: 没有找到任何支持的文档。

运行环境

- OS: 
- Browser: 
- Gradio version: 
- Python version:

补充说明

No response

Keldos-Li commented 3 months ago

测试一下其他文件可不可以?另外,请提供关于失败文件的更多相关信息。什么格式?什么编码?等等

KrystalandBarry commented 3 months ago

换了很多文件都不行,pdf,docx,jpg等,都是utf-8

KrystalandBarry commented 3 months ago

image 在线体验的地址,上传文件对话也报错

Keldos-Li commented 3 months ago

hugging face上似乎确实有问题,但我本地测试一切正常……

我无法复现,还请再描述一下详细的环境配置等信息,也许也和文件本身有关,也许是一些依赖版本不匹配当前代码的原因……可以试着pull最新的主线代码,然后pip install -r requirements.txt --upgrade

Keldos-Li commented 3 months ago

再使用最新的版本试试呢?