1. 选择github:https://github.com/chatchat-space/Langchain-Chatchat/
2,首先,配置虚拟环境。
conda env list conda create -n env python=3.10 推荐python 3.10
cd Langchain-Chatchat
pip install -r requirements.txt
3.下载模型文件,模型文件很大,网络问题,git clone的方式下不下来,网络联不通。
到官网手动下载。
$ git clone https://huggingface.co/THUDM/chatglm2-6b
$ git clone https://huggingface.co/moka-ai/m3e-base
chatglm2-6b模型尤其大可以到github页面找到清华云盘下载。
到这所有都下好了。
然后到config里把后缀的.example都去掉后,可以直接开跑,
python startup.py -a
然后出一个链接打开,就行了。
如果要知识库需要执行下:
python init_database.py --recreate-vs