chatchat-space / Langchain-Chatchat

Langchain-Chatchat(原Langchain-ChatGLM)基于 Langchain 与 ChatGLM, Qwen 与 Llama 等语言模型的 RAG 与 Agent 应用 | Langchain-Chatchat (formerly langchain-ChatGLM), local knowledge based LLM (like ChatGLM, Qwen and Llama) RAG and Agent app with langchain
Apache License 2.0
31.9k stars 5.56k forks source link

[BUG] 运行chatchat-br -r 报错 #4290

Closed AChao628 closed 3 months ago

AChao628 commented 4 months ago

问题描述 / Problem Description 执行chatchat-kb -r报错

复现问题的步骤 / Steps to Reproduce

  1. 执行 chatchat-kb -r

预期的结果 / Expected Result 初始化数据库成功

实际结果 / Actual Result 报错

2024-06-23 22:22:12,287 - connectionpool.py[line:872] - WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCA5891E0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。')': /v1/models/glm-4
2024-06-23 22:22:14,333 - connectionpool.py[line:872] - WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCA5893F0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。')': /v1/models/glm-4
2024-06-23 22:22:16,371 - connectionpool.py[line:872] - WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCA5895A0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。')': /v1/models/glm-4
2024-06-23 22:22:18,415 - provider_configuration.py[line:241] - WARNING: get custom model schema failed, get xinference model extra parameter failed, url: http://127.0.0.1:9997/v1/models/glm-4, error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/models/glm-4 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCA589750>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:22:20,457 - connectionpool.py[line:872] - WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BC9C7EF20>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。')': /v1/models/qwen1.5-chat
2024-06-23 22:22:22,495 - connectionpool.py[line:872] - WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BC9C7EEF0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。')': /v1/models/qwen1.5-chat
2024-06-23 22:22:24,538 - connectionpool.py[line:872] - WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021B9B2F1240>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。')': /v1/models/qwen1.5-chat
2024-06-23 22:22:26,593 - provider_configuration.py[line:241] - WARNING: get custom model schema failed, get xinference model extra parameter failed, url: http://127.0.0.1:9997/v1/models/qwen1.5-chat, error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/models/qwen1.5-chat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCA589300>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:22:26,669 uvicorn.error 15140 INFO     Started server process [15140]
2024-06-23 22:22:26,669 uvicorn.error 15140 INFO     Waiting for application startup.
2024-06-23 22:22:26,670 uvicorn.error 15140 INFO     Application startup complete.
2024-06-23 22:22:26,671 uvicorn.error 15140 INFO     Uvicorn running on http://127.0.0.1:20000 (Press CTRL+C to quit)
recreating all vector stores
C:\Users\AChao\AppData\Local\Programs\Python\Python310\lib\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(
2024-06-23 22:22:26,999 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:22:27,001 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:22:29,137 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCB3DFD60>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:22:29,138 uvicorn.access 15140 INFO     127.0.0.1:59746 - "POST /xinference/v1/embeddings HTTP/1.1" 500
2024-06-23 22:22:30,068 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:22:30,069 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:22:32,104 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCA77CA30>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:22:32,105 uvicorn.access 15140 INFO     127.0.0.1:59746 - "POST /xinference/v1/embeddings HTTP/1.1" 500
2024-06-23 22:22:33,643 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:22:33,645 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:22:35,668 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCA77EEC0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:22:35,670 uvicorn.access 15140 INFO     127.0.0.1:59746 - "POST /xinference/v1/embeddings HTTP/1.1" 500
2024-06-23 22:22:39,601 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:22:39,603 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:22:41,629 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCAECF4F0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:22:41,630 uvicorn.access 15140 INFO     127.0.0.1:59746 - "POST /xinference/v1/embeddings HTTP/1.1" 500
2024-06-23 22:22:49,280 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:22:49,283 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:22:51,320 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCAECF250>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:22:51,321 uvicorn.access 15140 INFO     127.0.0.1:59752 - "POST /xinference/v1/embeddings HTTP/1.1" 500
2024-06-23 22:22:58,329 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:22:58,331 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:23:00,359 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCAECDC90>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:23:00,360 uvicorn.access 15140 INFO     127.0.0.1:59756 - "POST /xinference/v1/embeddings HTTP/1.1" 500
2024-06-23 22:23:08,106 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:23:08,107 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:23:10,138 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCA77F430>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:23:10,138 uvicorn.access 15140 INFO     127.0.0.1:59759 - "POST /xinference/v1/embeddings HTTP/1.1" 500
2024-06-23 22:23:10,140 - before_sleep.py[line:65] - WARNING: Retrying chatchat.server.localai_embeddings.embed_with_retry.<locals>._embed_with_retry in 4.0 seconds as it raised InternalServerError: Error code: 500 - {'detail': "[xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCA77F430>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))"}.
2024-06-23 22:23:14,149 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:23:14,150 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:23:16,183 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCAECD990>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:23:16,184 uvicorn.access 15140 INFO     127.0.0.1:59759 - "POST /xinference/v1/embeddings HTTP/1.1" 500
2024-06-23 22:23:17,115 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:23:17,118 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:23:19,162 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCAEDC340>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:23:19,164 uvicorn.access 15140 INFO     127.0.0.1:59759 - "POST /xinference/v1/embeddings HTTP/1.1" 500
2024-06-23 22:23:20,836 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:23:20,837 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:23:22,870 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCA77F010>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:23:22,871 uvicorn.access 15140 INFO     127.0.0.1:59759 - "POST /xinference/v1/embeddings HTTP/1.1" 500
2024-06-23 22:23:25,942 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:23:25,944 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:23:27,972 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BCAECDF30>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:23:27,972 uvicorn.access 15140 INFO     127.0.0.1:59759 - "POST /xinference/v1/embeddings HTTP/1.1" 500
2024-06-23 22:23:34,594 model_providers.bootstrap_web.openai_bootstrap_web 15140 INFO     Received create_embeddings request: {'encoding_format': 'base64', 'input': ['init'], 'model': 'bge-large-zh-v1.5'}
2024-06-23 22:23:34,596 model_providers.bootstrap_web.openai_bootstrap_web 15140 WARNING  Warning: model not found. Using cl100k_base encoding.
2024-06-23 22:23:36,668 model_providers.bootstrap_web.openai_bootstrap_web 15140 ERROR    Error while creating embeddings: [xinference] Error: HTTPConnectionPool(host='127.0.0.1', port=9997): Max retries exceeded with url: /v1/cluster/auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021BC9FFFFD0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2024-06-23 22:23:36,670 uvicorn.access 15140 INFO     127.0.0.1:59773 - "POST /xinference/v1/embeddings HTTP/1.1" 500

环境信息 / Environment Information model-providers.yaml:

xinference:
  model_credential:
    - model: 'glm4-chat'
      model_type: 'llm'
      model_credentials:
        server_url: 'http://127.0.0.1:9997/'
        model_uid: 'glm4-chat'
    - model: 'bge-large-zh-v1.5'
      model_type: 'text-embedding'
      model_credentials:
        server_url: 'http://127.0.0.1:9997/'
        model_uid: 'bge-large-zh-v1.5'

Python: v3.10.0

zmh2000829 commented 4 months ago

same error

liunux4odoo commented 3 months ago

0.3.1 版已经发布,优化了配置方式,可以更新尝试。