-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUG] 请教下使用pip部署后对话不能使用,知识库无法创建新的 #5217
Comments
@AlienBB12138 你好!我是Dosu,我是一个可以帮助您解决 bug、回答问题并成为贡献者的机器人。我会在等待人类维护者的期间帮助您。 I found a similar issue related to the 'NoneType' object is not iterable error in the Additionally, ensure that the kb_list = [x["kb_name"] for x in (api.list_knowledge_bases() or [])] This change ensures that To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
/knowledge_base/list_knowledge_bases是可以通过浏览器访问到的返回内容为 |
我的也是这样:{ |
我解决了,是虚拟机挂了代理,把代理删了就好了 |
问题描述 / Problem Description

部署后无法使用,我是在虚拟机Ubuntu 22.04上部署的
使用多功能对话报错
使用RAG对话页面打开报错
环境信息 / Environment Information
-httpx 版本为 0.27.2
启动日志
`(myenv) root@alien:~/Langchain-Chatchat# chatchat start -a
cwd:/root/Langchain-Chatchat
==============================Langchain-Chatchat Configuration==============================
操作系统:Linux-5.15.0-131-generic-x86_64-with-glibc2.35.
python版本:3.10.12 (main, Jan 17 2025, 14:35:34) [GCC 11.4.0]
项目版本:0.3.1.3
langchain版本:0.1.17
数据目录:/root/Langchain-Chatchat
当前使用的分词器:ChineseRecursiveTextSplitter
默认选用的 Embedding 名称: nomic-embed-text
==============================Langchain-Chatchat Configuration==============================
2025-02-10 06:09:10.750 | INFO | chatchat.startup:start_main_server:257 - 正在启动服务:
2025-02-10 06:09:10.752 | INFO | chatchat.startup:start_main_server:258 - 如需查看 llm_api 日志,请前往 /root/Langchain-Chatchat/data/logs
/root/Langchain-Chatchat/myenv/lib/python3.10/site-packages/langchain/_api/module_import.py:87: LangChainDeprecationWarning: Importing GuardrailsOutputParser from langchain.output_parsers is deprecated. Please replace the import with the following:
from langchain_community.output_parsers.rail_parser import GuardrailsOutputParser
warnings.warn(
/root/Langchain-Chatchat/myenv/lib/python3.10/site-packages/pydantic/_internal/fields.py:160: UserWarning: Field "model_name" has conflict with protected namespace "model".
You may be able to resolve this warning by setting
model_config['protected_namespaces'] = ()
.warnings.warn(
2025-02-10 06:09:12.841 | INFO | chatchat.startup:run_api_server:55 - Api MODEL_PLATFORMS: [PlatformConfig(platform_name='xinference', platform_type='xinference', api_base_url='http://127.0.0.1:9997/v1', api_key='EMPTY', api_proxy='', api_concurrencies=5, auto_detect_model=False, llm_models=[], embed_models=[], text2image_models=[], image2text_models=[], rerank_models=[], speech2text_models=[], text2speech_models=[]), PlatformConfig(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'], text2image_models=[], image2text_models=[], rerank_models=[], speech2text_models=[], text2speech_models=[]), PlatformConfig(platform_name='oneapi', platform_type='oneapi', api_base_url='http://127.0.0.1:3000/v1', api_key='sk-', api_proxy='', api_concurrencies=5, auto_detect_model=False, llm_models=['chatglm_pro', 'chatglm_turbo', 'chatglm_std', 'chatglm_lite', 'qwen-turbo', 'qwen-plus', 'qwen-max', 'qwen-max-longcontext', 'ERNIE-Bot', 'ERNIE-Bot-turbo', 'ERNIE-Bot-4', 'SparkDesk'], embed_models=['text-embedding-v1', 'Embedding-V1'], text2image_models=[], image2text_models=[], rerank_models=[], speech2text_models=[], text2speech_models=[]), PlatformConfig(platform_name='openai', platform_type='openai', api_base_url='https://api.openai.com/v1', api_key='sk-proj-', api_proxy='', api_concurrencies=5, auto_detect_model=False, llm_models=['gpt-4o', 'gpt-3.5-turbo'], embed_models=['text-embedding-3-small', 'text-embedding-3-large'], text2image_models=[], image2text_models=[], rerank_models=[], speech2text_models=[], text2speech_models=[])]
INFO: Started server process [14756]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://192.168.1.144:7861 (Press CTRL+C to quit)
2025-02-10 06:09:14.211 | INFO | chatchat.startup:run_webui:80 - Webui MODEL_PLATFORMS: [PlatformConfig(platform_name='xinference', platform_type='xinference', api_base_url='http://127.0.0.1:9997/v1', api_key='EMPTY', api_proxy='', api_concurrencies=5, auto_detect_model=False, llm_models=[], embed_models=[], text2image_models=[], image2text_models=[], rerank_models=[], speech2text_models=[], text2speech_models=[]), PlatformConfig(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'], text2image_models=[], image2text_models=[], rerank_models=[], speech2text_models=[], text2speech_models=[]), PlatformConfig(platform_name='oneapi', platform_type='oneapi', api_base_url='http://127.0.0.1:3000/v1', api_key='sk-', api_proxy='', api_concurrencies=5, auto_detect_model=False, llm_models=['chatglm_pro', 'chatglm_turbo', 'chatglm_std', 'chatglm_lite', 'qwen-turbo', 'qwen-plus', 'qwen-max', 'qwen-max-longcontext', 'ERNIE-Bot', 'ERNIE-Bot-turbo', 'ERNIE-Bot-4', 'SparkDesk'], embed_models=['text-embedding-v1', 'Embedding-V1'], text2image_models=[], image2text_models=[], rerank_models=[], speech2text_models=[], text2speech_models=[]), PlatformConfig(platform_name='openai', platform_type='openai', api_base_url='https://api.openai.com/v1', api_key='sk-proj-', api_proxy='', api_concurrencies=5, auto_detect_model=False, llm_models=['gpt-4o', 'gpt-3.5-turbo'], embed_models=['text-embedding-3-small', 'text-embedding-3-large'], text2image_models=[], image2text_models=[], rerank_models=[], speech2text_models=[], text2speech_models=[])]
You can now view your Streamlit app in your browser.
URL: http://192.168.1.144:8501
2025-02-10 06:09:15,451 httpx 14766 INFO HTTP Request: GET http://192.168.1.144:7861/tools "HTTP/1.1 502 Bad Gateway"
2025-02-10 06:09:15.452 | ERROR | chatchat.webui_pages.utils:to_json:233 - JSONDecodeError: API未能返回正确的JSON。Expecting value: line 1 column 1 (char 0)
2025-02-10 06:09:15,542 httpx 14766 INFO HTTP Request: GET http://192.168.1.144:7861/tools "HTTP/1.1 502 Bad Gateway"
2025-02-10 06:09:15.546 | ERROR | chatchat.webui_pages.utils:to_json:233 - JSONDecodeError: API未能返回正确的JSON。Expecting value: line 1 column 1 (char 0)
2025-02-10 06:09:19,552 httpx 14766 INFO HTTP Request: GET http://192.168.1.144:7861/knowledge_base/list_knowledge_bases "HTTP/1.1 502 Bad Gateway"
2025-02-10 06:09:19.552 | ERROR | chatchat.webui_pages.utils:to_json:233 - JSONDecodeError: API未能返回正确的JSON。Expecting value: line 1 column 1 (char 0)
2025-02-10 06:09:19.554 Uncaught app exception
Traceback (most recent call last):
File "/root/Langchain-Chatchat/myenv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
exec(code, module.dict)
File "/root/Langchain-Chatchat/myenv/lib/python3.10/site-packages/chatchat/webui.py", line 71, in
kb_chat(api=api)
File "/root/Langchain-Chatchat/myenv/lib/python3.10/site-packages/chatchat/webui_pages/kb_chat.py", line 118, in kb_chat
kb_list = [x["kb_name"] for x in api.list_knowledge_bases()]
TypeError: 'NoneType' object is not iterable
2025-02-10 06:09:21,131 httpx 14766 INFO HTTP Request: GET http://192.168.1.144:7861/knowledge_base/list_knowledge_bases "HTTP/1.1 502 Bad Gateway"
2025-02-10 06:09:21.132 | ERROR | chatchat.webui_pages.utils:to_json:233 - JSONDecodeError: API未能返回正确的JSON。Expecting value: line 1 column 1 (char 0)
2025-02-10 06:09:21.132 Uncaught app exception
Traceback (most recent call last):
File "/root/Langchain-Chatchat/myenv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
exec(code, module.dict)
File "/root/Langchain-Chatchat/myenv/lib/python3.10/site-packages/chatchat/webui.py", line 71, in
kb_chat(api=api)
File "/root/Langchain-Chatchat/myenv/lib/python3.10/site-packages/chatchat/webui_pages/kb_chat.py", line 118, in kb_chat
kb_list = [x["kb_name"] for x in api.list_knowledge_bases()]
TypeError: 'NoneType' object is not iterable`
model_settings.yaml配置如下
DEFAULT_LLM_MODEL: qwen2
DEFAULT_EMBEDDING_MODEL: nomic-embed-text
Agent_MODEL: ''
HISTORY_LEN: 3
MAX_TOKENS:
TEMPERATURE: 0.7
SUPPORT_AGENT_MODELS:
LLM_MODEL_CONFIG:
preprocess_model:
model: ''
temperature: 0.05
max_tokens: 4096
history_len: 10
prompt_name: default
callbacks: false
llm_model:
model: ''
temperature: 0.9
max_tokens: 4096
history_len: 10
prompt_name: default
callbacks: true
action_model:
model: ''
temperature: 0.01
max_tokens: 4096
history_len: 10
prompt_name: ChatGLM3
callbacks: true
postprocess_model:
model: ''
temperature: 0.01
max_tokens: 4096
history_len: 10
prompt_name: default
callbacks: true
image_model:
model: sd-turbo
size: 256*256
platform_type: ollama
MODEL_PLATFORMS:
platform_type: xinference
api_base_url: http://127.0.0.1:9997/v1
api_key: EMPTY
api_proxy: ''
api_concurrencies: 5
auto_detect_model: false
llm_models: []
embed_models: []
text2image_models: []
image2text_models: []
rerank_models: []
speech2text_models: []
text2speech_models: []
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:
embed_models:
text2image_models: []
image2text_models: []
rerank_models: []
speech2text_models: []
text2speech_models: []
platform_type: oneapi
api_base_url: http://127.0.0.1:3000/v1
api_key: sk-
api_proxy: ''
api_concurrencies: 5
auto_detect_model: false
llm_models:
embed_models:
text2image_models: []
image2text_models: []
rerank_models: []
speech2text_models: []
text2speech_models: []
platform_type: openai
api_base_url: https://api.openai.com/v1
api_key: sk-proj-
api_proxy: ''
api_concurrencies: 5
auto_detect_model: false
llm_models:
embed_models:
text2image_models: []
image2text_models: []
rerank_models: []
speech2text_models: []
text2speech_models: []
basic_settings.yaml配置如下
version: 0.3.1.3
log_verbose: true
HTTPX_DEFAULT_TIMEOUT: 300.0
KB_ROOT_PATH: /root/Langchain-Chatchat/data/knowledge_base
SQLALCHEMY_DATABASE_URI。
DB_ROOT_PATH: /root/Langchain-Chatchat/data/knowledge_base/info.db
SQLALCHEMY_DATABASE_URI: sqlite:////root/Langchain-Chatchat/data/knowledge_base/info.db
OPEN_CROSS_DOMAIN: false
DEFAULT_BIND_HOST: 192.168.1.144
API_SERVER:
host: 192.168.1.144
port: 7861
public_host: 192.168.1.144
public_port: 7861
WEBUI_SERVER:
host: 192.168.1.144
port: 8501
The text was updated successfully, but these errors were encountered: