【纯小白/0基础】在阿里云上部署LangChain-Chatchat

注意:阿里云可以白嫖三个月,直接在csdn搜索领取。

LangChain-Chatchat:https://github.com/chatchat-space/Langchain-Chatchat?tab=readme-ov-file

(下面开始实操了)

1.创建一个DSW实例。

2.检查一下python版本,需在3.8-3.11(官方推荐3.11,本人3.10也没啥问题)**

python --version

3.拉取仓库,并安装依赖。**

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

4.模型下载

我们需要建一个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文件夹看到它们了!

5.修改模型所在路径

找到configs/model_config.py.example,点击打开,修改为
/mnt/workspace/Langchain-Chatchat/model/bge-large-zh-v1.5
在这里插入图片描述
/mnt/workspace/Langchain-Chatchat/model/chatglm3-6b
在这里插入图片描述

6.初始化知识库和配置文件

返回上一级目录

cd ..
python copy_config_example.py
python init_database.py --recreate-vs

7.运行

python startup.py -a

在这里插入图片描述
点击链接即可。你可以创建自己的知识库,并选择知识库问答进行匹配。
在这里插入图片描述

8.遇到的Bug

上传知识文件时出现错误:
AxiosError: Request failed with status code 403
解决办法:http://t.csdnimg.cn/ldUNT

  • 20
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值