Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] chatchat kb -r 卡死,无法结束 #5134

Open
morego123 opened this issue Dec 11, 2024 · 3 comments
Open

[BUG] chatchat kb -r 卡死,无法结束 #5134

morego123 opened this issue Dec 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@morego123
Copy link

按照首页的教程,前面的都正确,xinference 开启了chat 和 embeding 2个模型
执行到命令 chatchat kb -r 卡死,无法结束
输出如下:
正在将 samples/test_files/langchain-ChatGLM_open.csv 添加到向量库,共包含323条文档
正在将 samples/大模型技术栈-实战与应用.md 添加到向量库,共包含1条文档
正在将 samples/大模型推理优化策略.md 添加到向量库,共包含6条文档
正在将 samples/分布式训练技术原理.md 添加到向量库,共包含8条文档
正在将 samples/大模型应用技术原理.md 添加到向量库,共包含7条文档
正在将 samples/大模型指令对齐训练原理.md 添加到向量库,共包含3条文档
正在将 samples/大模型技术栈-算法与原理.md 添加到向量库,共包含23条文档
【之后卡死,不出现首页教程里的知识库信息】

@morego123 morego123 added the bug Something isn't working label Dec 11, 2024
Copy link

dosubot bot commented Dec 11, 2024

I found a similar issue where the command chatchat kb -r hangs and does not complete as expected. The problem was due to an incorrect embedding model configuration. The recommended solution is to use the official Ollama embedding model 'nomic-embed-text' instead of 'bge-large-zh-v1.5'. You should update your model_settings.yaml with the following configuration:

MODEL_PLATFORMS:
- platform_name: ollama
  platform_type: ollama
  api_base_url: http://127.0.0.1:11434/v1
  api_key: EMPTY
  api_proxy: ''
  api_concurrencies: 5
  auto_detect_model: false
  llm_models:
  - qwen2
  embed_models:
  - nomic-embed-text

Additionally, if you are on Windows, there might be an issue with the unstructured.partition.auto module. You can check this by running:

from unstructured.partition.auto import partition

If it hangs, try uninstalling and reinstalling the python-magic-bin package with the correct version:

pip uninstall python-magic-bin
pip install 'python-magic-bin=={version}'

After making these changes, recreate the knowledge base as instructed [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@morego123
Copy link
Author

是的,需要重新安装 pip install 'python-magic-bin=={version}'

@xmxoxo
Copy link

xmxoxo commented Dec 12, 2024

跟踪了一下,发现第一次执行: chatchat kb -r 命令时,需要下载nltk_data的相关文件,特别是“averaged_perceptron_tagger.zip”这个文件的下载,下载时间很长,所以会出现 向量添加完后,还在等待的情况。
解决方案:
一种方式就是耐心等待;
另一种方式就是手工下载nltk的数据,放到指定位置,总共有这两个文件:

/root/nltk_data/tokenizers/punkt.zip
/root/nltk_data/taggers/averaged_perceptron_tagger.zip

下载后分别解压zip文件,最终目录为:

/root/nltk_data/tokenizers/
/root/nltk_data/taggers/

NLTK数据下载地址:

punkt.zip

averaged_perceptron_tagger.zip

解压命令:

unzip -xo averaged_perceptron_tagger.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants