署部
- 下载项目
git clone --recursive https://github.com/chatchat-space/Langchain-Chatchat.git
- 进入目录
cd Langchain-Chatchat
- anaconda环境准备
- 创建python环境
conda create -n langchain_env python=3.10 -y
- 激活环境
conda activate langchain_env
- 验证pyhton环境
python --version
- 创建python环境
- 安装依赖
pip install langchain-chatchat -i https://pypi.tuna.tsinghua.edu.cn/simple
-
改变初始化生成的文件目录
export CHATCHAT_ROOT=自定义目录
-
初始化
chatchat init
- 验证
#API文档 http://localhost:7861/docs #langchat-chatcat url http://localhost:8501/
- 获取langchain-chatchat下载
或curl https://github.com/chatchat-space/Langchain-Chatchat
https://gitee.com/www.ydj.com/Langchain-Chatchat
或
配置
.py版本
ollama模型配置
vim /langchain-chatchat/configs/model_config.py
- 配置大语言模型和嵌入模型名
- 配置ollama服务
ONLINE_LLM_MODEL = { # 加入Ollama "ollama":{ "model_name":"qwq", "api_base_url":"http://58.144.197.135:15003/", } }
.yaml
ollama模型配置
- 默认用户目录下修改 model_setting.yaml
- 可选
- 运行
chatchat kb -r
- 启动
chatchat start -a
报错
RAG
- 更换httpx版本
// 卸载旧版本 0.28.1 pip uninstall httpx // 安装新版本 0.27.2 pip install httpx==0.27.2
- 重启
// 重新启动 chatchat start -a