Files
chatbot-01-awa-kim/README.md
T
2026-08-05 13:33:10 +08:00

32 lines
716 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# cf-chatbot
基于 Cloudflare Workers + Pages 的 AI 聊天机器人,支持自定义 OpenAI 兼容 API。
## Quick Start
```bash
pnpm install
pnpm dev
```
## Configuration
### 环境变量(wrangler.jsonc / Cloudflare Dashboard)
| 变量 | 说明 | 默认值 |
|---|---|---|
| `OPENAI_BASE_URL` | API 地址 | `http://awa.kim:8000/v1` |
| `MODEL` | 模型名称 | `gpt-5.4-nano` |
| `SYSTEM_PROMPT` | 系统提示词 | `You are a helpful assistant.` |
| `OPENAI_API_KEY` | API 密钥(可选,前端也可配置) | - |
### 前端 Settings
点击页面右上角 **Settings** 按钮,可配置 Model、API Key、User ID,数据存储在浏览器 localStorage。
## Deploy
```bash
pnpm deploy
```