更新文档

This commit is contained in:
hobby
2025-02-19 21:31:09 +08:00
parent cddf297103
commit 0cf82e0a42

View File

@@ -19,7 +19,7 @@
## 一键部署到cloudflare ## 一键部署到cloudflare
1. Fork 本项目到你的 GitHub 账号 1. [Fork本项目](https://github.com/new/import)到你的 GitHub 账号
2. 登录 [Cloudflare Dashboard](https://dash.cloudflare.com/) 2. 登录 [Cloudflare Dashboard](https://dash.cloudflare.com/)
- 进入 Workers & Pages 页面 - 进入 Workers & Pages 页面
@@ -32,7 +32,7 @@
- Framework preset: React - Framework preset: React
- Build command: `npm run build` - Build command: `npm run build`
- Build output directory: `dist` - Build output directory: `dist`
- 环境变量(必须): - 设置环境变量(必须):
``` ```
DASHSCOPE_API_KEY=xxx //千问模型KEY DASHSCOPE_API_KEY=xxx //千问模型KEY
HUNYUAN_API_KEY=xxx //混元模型KEY HUNYUAN_API_KEY=xxx //混元模型KEY
@@ -48,13 +48,26 @@
## 自定义(可选) ## 自定义(可选)
1. 配置 AI 角色 1. 配置 模型和AI 角色
- 在 `config/aiCharacters.ts` 中配置 AI 角色信息
- 在 `config/aiCharacters.ts` 中
自定义模型
```typescript
{
model: string; // 模型标识, 请按照服务方实际模型名称配置(注意:豆包的配置需要填写火山引擎接入点)比如qwen-plus,deepseek-v3,hunyuan-standard
apiKey: string; // 模型的 API 密钥
baseURL: string; // 模型的 baseURL
}
```
配置 AI 角色信息
```typescript ```typescript
id: string; // 角色唯一标识 id: string; // 角色唯一标识
name: string; // 角色显示名称 name: string; // 角色显示名称
personality: string; // 角色性格描述 personality: string; // 角色性格描述
model: string; // 使用的模型,可选值: qwen/hunyuan/ark model: string; // 使用的模型,要从modelConfigs中选择
avatar?: string; // 可选的头像 URL avatar?: string; // 可选的头像 URL
custom_prompt?: string; // 可选的自定义提示词 custom_prompt?: string; // 可选的自定义提示词
``` ```