安装过程
1. 创建虚拟环境
conda create -n langchain-chatglm python==3.10
conda activate langchain-chatglm
2. 部署 langchain-ChatGLM
git clone https://github.com/imClumsyPanda/langchain-ChatGLM
pip3 install -r requirements.txt
pip3 install -U gradio
pip3 install modelscope
3. 启动 langchain-ChatGLM
python startup.py -a
streamlit run webui.py
报错合集
报错:
找不到model_config.py文件
解决:
将 Langchain-Chatchat/configs 下所有以 .example 结尾的文件都复制并改成.py 文件:
报错:
ImportError: cannot imxport name 'Schema' from 'pydantic'
解决:
- 降低
fastapi
的版本,降至fastapi==0.88.0
pip uninstall fastapi
pip install fastapi==0.88.0
- 成功安装
fastapi==0.88.0
- 重新运行
python startup.py -a
报错:
httpx.RemoteProtocolError: peer closed connection without sending complete message body (incomplete chunked read)
解决:
pip unstall openai
pip install openai==0.28.1