Win11 部署 Langchain-Chatchat

LangChain-Chatchat (原 Langchain-ChatGLM)(代码分享)

基于 ChatGLM 等大语言模型与 Langchain 等应用框架实现,开源、可离线部署的检索增强生成(RAG)大模型知识库项目。

部署还是比较简单的,照着文档一步一步来就行

先看下 python 版本,最好 3.10:https://www.python.org/download/releases/

python --version

image

然后拉取仓库,安装依赖

# 拉取仓库
git clone https://github.com/chatchat-space/Langchain-Chatchat.git

# 进入目录
cd Langchain-Chatchat

# 安装全部依赖
pip install -r requirements.txt 

我 webui 和 api 都安装,可以按需安装的

#安装API

pip install -r requirements_api.txt





#安装webui

pip install -r requirements_webui.txt 

下面需要下载模型,受限需要装下 Git LFS:https://docs.github.com/zh/repositories/working-with-files/managing-large-files/installing-git-large-file-storage

git lfs install

模型一般从 HuggingFace 下载: https://huggingface.co/models

不过由于某些原因可能无法访问,我们可以从镜像站点下载:https://hf-mirror.com/models

下载模型:

git clone https://hf-mirror.com/THUDM/chatglm2-6b
git clone https://hf-mirror.com/moka-ai/m3e-base

下面复制下默认的配置文件

python copy_config_example.py

初始化知识库

python init_database.py --recreate-vs

然后启动

python startup.py -a

顺利的话可以看到当前配置:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值