This commit is contained in:
guanjihuan 2024-03-08 12:53:16 +08:00
parent 3e0ea312c8
commit 0450d2e88a
2 changed files with 7 additions and 3 deletions

View File

@ -117,7 +117,7 @@ python -m streamlit run ./InternLM.py --theme.base dark --server.port 8501
### 三、使用第三方模型 API
#### 1. 智谱 - ChatGLM_Turbo
智谱 - ChatGLM Turbo 的 API key 获取收费可免费试用https://maas.aminer.cn
运行命令:
@ -126,6 +126,8 @@ python -m streamlit run ./InternLM.py --theme.base dark --server.port 8501
python -m streamlit run ./ChatGLM_Turbo.py --theme.base dark --server.port 8501
```
说明:当前代码只对 pip install zhipuai==1.0.7 有效,对最新版本不兼容。
#### 2. 讯飞 - 星火大模型
讯飞 - 星火大模型的 API key 获取收费可免费试用https://xinghuo.xfyun.cn
@ -134,4 +136,4 @@ python -m streamlit run ./ChatGLM_Turbo.py --theme.base dark --server.port 8501
```
python -m streamlit run ./星火大模型.py --theme.base dark --server.port 8501
```
```

View File

@ -13,9 +13,11 @@ try:
import zhipuai
except:
import os
os.system('pip install zhipuai')
os.system('pip install zhipuai==1.0.7')
import zhipuai
# 说明:当前代码只对 pip install zhipuai==1.0.7 有效,对最新版本不兼容。
# 从官网获取 API_KEY
zhipuai.api_key = " "