Skip to content

Commit 838aa9d

Browse files
committed
docs: add custom API setup guide (Volcengine, Zhipu, SiliconFlow, Moonshot)
Users frequently confuse ollama with third-party APIs, causing 401 errors. Added concrete examples with ao init commands and .env config.
1 parent 47db510 commit 838aa9d

2 files changed

Lines changed: 45 additions & 2 deletions

File tree

README.en.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,24 @@ analyze ──→ tech_review ──→ summary
211211
| Claude API | `provider: "claude"` | `ANTHROPIC_API_KEY` |
212212
| OpenAI | `provider: "openai"` | `OPENAI_API_KEY` |
213213
214-
All API providers support custom `base_url` and `api_key`, compatible with any OpenAI-compatible API.
214+
**Custom API (any OpenAI-compatible endpoint):**
215+
216+
```bash
217+
ao init --provider openai --model model-name \
218+
--base-url https://your-api-endpoint/v1 \
219+
--api-key your-key
220+
```
221+
222+
Or edit `.env` manually:
223+
224+
```env
225+
AO_PROVIDER=openai
226+
AO_MODEL=model-name
227+
OPENAI_BASE_URL=https://your-api-endpoint/v1
228+
OPENAI_API_KEY=your-key
229+
```
230+
231+
> ⚠️ Use `provider: "openai"` for third-party APIs, not `provider: "ollama"`. Ollama is for local models only and does not send API keys.
215232
216233
## CLI Reference
217234

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,33 @@ analyze ──→ tech_review ──→ summary
210210
| Claude API | `provider: "claude"` | `ANTHROPIC_API_KEY` |
211211
| OpenAI | `provider: "openai"` | `OPENAI_API_KEY` |
212212
213-
所有 API 提供商支持自定义 `base_url` 和 `api_key`,兼容智谱、月之暗面等 OpenAI 兼容 API。
213+
**自定义 API(火山引擎、智谱、月之暗面、硅基流动等 OpenAI 兼容 API):**
214+
215+
```bash
216+
ao init --provider openai --model 模型名 \
217+
--base-url https://你的API地址/v1 \
218+
--api-key 你的key
219+
```
220+
221+
或手动编辑 `.env`
222+
223+
```env
224+
AO_PROVIDER=openai
225+
AO_MODEL=模型名
226+
OPENAI_BASE_URL=https://你的API地址/v1
227+
OPENAI_API_KEY=你的key
228+
```
229+
230+
常见示例:
231+
232+
| 平台 | base_url | model |
233+
|------|----------|-------|
234+
| 火山引擎 | `https://ark.cn-beijing.volces.com/api/coding/v3` | `ark-code-latest` |
235+
| 智谱 AI | `https://open.bigmodel.cn/api/paas/v4` | `glm-4` |
236+
| 硅基流动 | `https://api.siliconflow.cn/v1` | `deepseek-ai/DeepSeek-V3` |
237+
| 月之暗面 | `https://api.moonshot.cn/v1` | `moonshot-v1-8k` |
238+
239+
> ⚠️ 注意:这些平台请使用 `provider: "openai"`,不要用 `provider: "ollama"`。Ollama 仅用于本地模型,不发送 API Key。
214240
215241
## CLI 命令
216242

0 commit comments

Comments
 (0)