赞
踩
注意:阿里云可以白嫖三个月,直接在csdn搜索领取。
LangChain-Chatchat:https://github.com/chatchat-space/Langchain-Chatchat?tab=readme-ov-file
(下面开始实操了)
python --version
git clone https://github.com/chatchat-space/Langchain-Chatchat.git
进入目录
cd Langchain-Chatchat
安装依赖(看一下有几个依赖安装几个,我安装时有四个依赖!)
pip install -r requirements.txt
pip install -r requirements_api.txt
pip install -r requirements_webui.txt
pip install -r requirements_lite.txt
我们需要建一个model文件夹,放置我们下载的模型。
官方给的是下载模型chatglm3-6b,Embedding模型bge-large-zh。因为HuggingFace需要进行一些设置才能连接上,所以我们直接选择曲线救国去魔塔:https://modelscope.cn/my/overview
搜索chatglm-6b,点击模型库,点击chatglm3-6b,点击模型文件,点击下载模型。
进入model文件夹
cd model
git clone https://www.modelscope.cn/ZhipuAI/chatglm3-6b.git
同理搜索bge-large-zh-v1.5
git clone https://www.modelscope.cn/Xorbits/bge-large-zh-v1.5.git
现在你就可以在model文件夹看到它们了!
找到configs/model_config.py.example,点击打开,修改为
/mnt/workspace/Langchain-Chatchat/model/bge-large-zh-v1.5
/mnt/workspace/Langchain-Chatchat/model/chatglm3-6b
返回上一级目录
cd ..
python copy_config_example.py
python init_database.py --recreate-vs
python startup.py -a
点击链接即可。你可以创建自己的知识库,并选择知识库问答进行匹配。
上传知识文件时出现错误:
AxiosError: Request failed with status code 403
解决办法:http://t.csdnimg.cn/ldUNT
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。