Update code
This commit is contained in:
28
coze_api/README.md
Normal file
28
coze_api/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Coze 智能体 API 调用
|
||||
|
||||
## 使用说明
|
||||
|
||||
### 1. 安装依赖
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### 2. 配置环境变量
|
||||
复制 `.env.example` 为 `.env`,填写你的 Coze API 凭证:
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
需要填写:
|
||||
- `COZE_API_TOKEN` - Coze 平台的 API Token(在 Coze 平台 → 个人设置 → API Token 获取)
|
||||
- `COZE_BOT_ID` - Bot ID(在 Bot 发布后获取)
|
||||
|
||||
### 3. 运行测试
|
||||
```bash
|
||||
python test_coze_api.py
|
||||
```
|
||||
|
||||
## 文件说明
|
||||
- `coze_client.py` - Coze API 封装客户端
|
||||
- `test_coze_api.py` - 测试调用脚本
|
||||
- `.env.example` - 环境变量模板
|
||||
Reference in New Issue
Block a user