调用智谱AI文件对话接口进行问答
.
├── LICENSE (Git仓库的开源许可证)
├── README.md (本文档)
├── environment.yml (Conda使用的环境需求文件)
├── file_chat.py (文件对话Streamlit页面)
└── requirements.txt (Pip使用的环境需求文件)
-
安装Conda:建议使用命令行安装 Miniconda
-
创建虚拟环境
conda env create -f environment.yml --name <虚拟环境名称>
-
安装Python:版本>=3.10, 参考各操作系统对应网上教程
-
创建虚拟环境
python3 -m venv venv
-
激活虚拟环境
- Conda
conda activate <虚拟环境名称>
- Venv
source venv/bin/activate
- Conda
-
启动文件对话用户界面
streamlit run file_chat.py
- Streamlit: https://docs.streamlit.io/
- 智谱文件问答API:https://bigmodel.cn/dev/howuse/fileqa
- 智谱RAG问答API:https://bigmodel.cn/dev/howuse/retrieval