langchain
langchain
使用源码部署运行环境安装使用conda创建环境代码语言:powershell复制conda create -n chatchat python=.9 拉取源码代码语言:powershell复制git clone .git进入主目录代码语言:powershell复制cd Langchain-Chatchat/libs/chatchat-server/配置环境变量代码语言:po
langchain
使用源码部署
运行环境安装
使用conda
创建环境
代码语言:powershell复制conda create -n chatchat python=.9
拉取源码
代码语言:powershell复制git clone .git
进入主目录
代码语言:powershell复制cd Langchain-Chatchat/libs/chatchat-server/
配置环境变量
代码语言:powershell复制export CHATCHAT_ROOT=/parth/to/chatchat_data
初始化配置
代码语言:powershell复制python chatchat/cli.py init
运行后会在配置的环境变量目录中生成配置文件
basic_settings.yaml # 基本配置信息,包括数据目录、服务器配置等
kb_settings.yaml # 知识库相关配置项
model_settings.yaml # 模型相关配置项
prompt_settings.yaml # prompt 模板
tool_settings.yaml # 工具相关配置项
需要内网中其他设备访问需要修改·basic_settings.yaml
以下配置
# basic_settings.yaml
# WEBUI 服务器地址
WEBUI_SERVER:
host: 0.0.0.0
port: 8501
可自定义模型加载平台,默认使用xinference
'xinference', 'ollama', 'oneapi', 'fastchat', 'openai', 'custom openai'
在model_settings.yaml
配置
- 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: true
llm_models: []
embed_models: []
text2image_models: []
image2text_models: []
rerank_models: []
speech2text_models: []
text2speech_models: []
启动服务
代码语言:powershell复制python chatchat/cli.py start -a
langchain-chatchat
启动后报错
2024-12-20 16:40:15.222 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:15.221 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:15.227 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:15.21 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:15.22 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:15.22 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:15.2 | ERROR | chatchat.webui_pages.utils:to_json:2 - AttributeError: API未能返回正确的JSO。'oneType' object has no attribute 'json'
2024-12-20 16:40:15.2 | ERROR | chatchat.webui_pages.utils:to_json:2 - AttributeError: API未能返回正确的JSO。'oneType' object has no attribute 'json'
2024-12-20 16:40:16.266 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:16.270 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:16.271 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:16.275 | ERROR | chatchat.webui_pages.utils:to_json:2 - AttributeError: API未能返回正确的JSO。'oneType' object has no attribute 'json'
2024-12-20 16:40:18.400 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:18.406 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:18.406 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /tools: __init__() got an unexpected keyword argument 'proxies'
2024-12-20 16:40:18.407 | ERROR | chatchat.webui_pages.utils:to_json:2 - AttributeError: API未能返回正确的JSO。'oneType' object has no attribute 'json'
httpx
版本问题过高的问题
将httpx
版本降级
pip install httpx==0.27.2
启动成功访问,访问服务http://127.0.0.1:8501
参考
.md
.md
#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
上传时间: 2025-07-21 21:55:51
推荐阅读
留言与评论(共有 15 条评论) |
本站网友 韩华新能源 | 19分钟前 发表 |
18.406 | ERROR | chatchat.webui_pages.utils | |
本站网友 毒龙钻服务 | 19分钟前 发表 |
15.22 | ERROR | chatchat.webui_pages.utils | |
本站网友 上海长江医院 | 20分钟前 发表 |
15.221 | ERROR | chatchat.webui_pages.utils | |
本站网友 许仕仁 | 13分钟前 发表 |
[] embed_models | |
本站网友 电狐手机电影转换器 | 19分钟前 发表 |
40 | |
本站网友 移动叔叔root工具 | 17分钟前 发表 |
40 | |
本站网友 浙商银行信用卡 | 26分钟前 发表 |
'oneapi' | |
本站网友 走廊装修效果图 | 6分钟前 发表 |
64 - TypeError | |
本站网友 gdcc | 2分钟前 发表 |
15.2 | ERROR | chatchat.webui_pages.utils | |
本站网友 心理辅导 | 26分钟前 发表 |
40 | |
本站网友 zend | 1分钟前 发表 |
xinference api_base_url | |
本站网友 网络电视广告 | 12分钟前 发表 |
get | |
本站网友 去痘印最有效的方法 | 13分钟前 发表 |
15.222 | ERROR | chatchat.webui_pages.utils | |
本站网友 天涯博客 | 29分钟前 发表 |
'oneType' object has no attribute 'json' 2024-12-20 16 |