Langchain-Chatchat
Langchain-Chatchat copied to clipboard
[BUG] 无法新建数据库
问题描述 / Problem Description 无法新建数据库
复现问题的步骤 / Steps to Reproduce
在建立数据库的时候,一直停留在建立页面上
后台显示如下:
INFO: 127.0.0.1:64178 - "POST /llm_model/list_config_models HTTP/1.1" 200 OK
2024-02-25 13:21:59,628 - _client.py[line:1027] - INFO: HTTP Request: POST http://127.0.0.1:7861/llm_model/list_config_models "HTTP/1.1 200 OK"
2024-02-25 13:23:05,709 - utils.py[line:95] - ERROR: ReadTimeout: error when post /knowledge_base/search_docs: timed out
File "H:\agent\LBchat\webui_pages\knowledge_base\knowledge_base.py", line 329, in
环境信息 / Environment Information 操作系统:Windows-10-10.0.22621-SP0. python版本:3.10.12 | packaged by Anaconda, Inc. | (main, Jul 5 2023, 19:01:18) [MSC v.1916 64 bit (AMD64)] 项目版本:v0.2.10 langchain版本:0.0.354. fastchat版本:0.2.35
附加信息 / Additional Information 执行“python init_database.py --recreate-vs”没有问题的。
🤖
你好呀,@wusongbai139!很高兴再次见到你。希望你今天过得不错。
感谢您的反馈。根据您提供的日志,问题可能出在 /knowledge_base/search_docs 和 /knowledge_base/create_knowledge_base 这两个请求上,它们都出现了超时错误。这可能是由于处理这些请求的函数在处理大量数据或执行复杂操作时,超出了预设的超时时间。
此外,日志中还出现了一个错误,提示“string indices must be integers”。这可能是由于在处理某个字符串时,尝试使用字符串作为索引,而不是整数。这可能是由于数据格式错误或代码中的一个错误。
关于 init_database.py 脚本,这个脚本主要用于管理和操作应用程序的数据库。在您的情况下,执行 python init_database.py --recreate-vs 没有问题,这意味着数据库的向量存储已经成功重建。
我建议您检查以下几点:
- 检查您的网络连接,确保服务器可以在预设的超时时间内响应请求。
- 检查您的数据格式,确保它们符合预期。特别是,检查是否有任何字符串被错误地用作索引。
- 如果可能,尝试减少请求的数据量或简化操作,以减少处理时间。
如果问题仍然存在,我建议您提供更多的信息,如详细的错误消息、代码片段或更详细的复现步骤,以便我们能更好地帮助您解决问题。
此外,我还找到了一些类似的已解决问题,可能对您有所帮助:
- Execute Command $ python init_database.py --recreate-vs Error occurred after
- [BUG] 初始化数据库 python init_database.py --recreate-vs 报错/ couldn't find config.json.
希望这些信息对您有所帮助。
Sources
- Execute Command $ python init_database.py --recreate-vs Error occurred after
- server/knowledge_base/kb_api.py
- init_database.py
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
尝试一下本地行不行
我也遇到这个问题了,但我用的就是本地的模型
INFO: loading vector store in '14/vector_store/bge-large-zh-v1.5' from disk. 2024-03-22 11:07:07,460 - utils.py[line:95] - ERROR: ReadTimeout: error when post /knowledge_base/create_knowledge_base: timed out
我也遇到这个问题了,但我用的就是本地的模型
INFO: loading vector store in '14/vector_store/bge-large-zh-v1.5' from disk. 2024-03-22 11:07:07,460 - utils.py[line:95] - ERROR: ReadTimeout: error when post /knowledge_base/create_knowledge_base: timed out
我重新下载了模型,重新启动了几次就好了,具体原因还不知道为什么