Files
2026-08-10 10:25:11 +08:00

35 lines
793 B
Markdown
Raw Permalink 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。
**由于01关闭了api,这个repo现在没有什么卵用了呢……**
## 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
```