feat: 添加大纲写作功能与服务器端改进
- 新增 OutlineWriterPanel 和 OutlineResultPanel 组件 - 重构服务器端数据库接口 (server/db.js) - 添加 LLM 服务模块 (server/llm.js) - 更新配置和设置面板 - 优化文档选择器和素材面板 - 更新部署文档和环境变量示例
This commit is contained in:
45
.env.example
45
.env.example
@@ -1,28 +1,39 @@
|
||||
# AI 写作工坊 - 模型服务商配置
|
||||
# 复制此文件为 .env 并填入您的 API Key
|
||||
# AI 写作工坊 - 服务端模型与数据库配置
|
||||
# 复制此文件为 .env 并填入服务端 API Key
|
||||
|
||||
# ========== 服务端 API ==========
|
||||
API_PORT=3001
|
||||
|
||||
# ========== DeepSeek (默认) ==========
|
||||
VITE_DEEPSEEK_API_URL=https://api.deepseek.com/chat/completions
|
||||
VITE_DEEPSEEK_API_KEY=your_deepseek_api_key_here
|
||||
VITE_DEEPSEEK_MODEL=deepseek-chat
|
||||
DEEPSEEK_API_URL=https://api.deepseek.com/chat/completions
|
||||
DEEPSEEK_API_KEY=your_deepseek_api_key_here
|
||||
DEEPSEEK_MODEL=deepseek-chat
|
||||
|
||||
# ========== 千帆大模型 (百度文心一言) ==========
|
||||
# VITE_QIANFAN_API_URL=https://qianfan.baidubce.com/v2/chat/completions
|
||||
# VITE_QIANFAN_API_KEY=your_bearer_token_here
|
||||
# VITE_QIANFAN_APP_ID=your_app_id_here
|
||||
# VITE_QIANFAN_MODEL=ernie-4.0-8k
|
||||
# QIANFAN_API_URL=https://qianfan.baidubce.com/v2/chat/completions
|
||||
# QIANFAN_API_KEY=your_bearer_token_here
|
||||
# QIANFAN_APP_ID=your_app_id_here
|
||||
# QIANFAN_MODEL=ernie-4.0-8k
|
||||
|
||||
# ========== OpenAI ==========
|
||||
# VITE_OPENAI_API_URL=https://api.openai.com/v1/chat/completions
|
||||
# VITE_OPENAI_API_KEY=your_openai_api_key_here
|
||||
# VITE_OPENAI_MODEL=gpt-4o
|
||||
# OPENAI_API_URL=https://api.openai.com/v1/chat/completions
|
||||
# OPENAI_API_KEY=your_openai_api_key_here
|
||||
# OPENAI_MODEL=gpt-4o
|
||||
|
||||
# ========== Claude (Anthropic) ==========
|
||||
# VITE_CLAUDE_API_URL=https://api.anthropic.com/v1/messages
|
||||
# VITE_CLAUDE_API_KEY=your_claude_api_key_here
|
||||
# VITE_CLAUDE_MODEL=claude-3-5-sonnet
|
||||
# CLAUDE_API_URL=https://api.anthropic.com/v1/messages
|
||||
# CLAUDE_API_KEY=your_claude_api_key_here
|
||||
# CLAUDE_MODEL=claude-3-5-sonnet
|
||||
|
||||
# ========== 自定义 API 中继 ==========
|
||||
# VITE_CUSTOM_API_URL=https://your-api-gateway.com/v1/chat/completions
|
||||
# VITE_CUSTOM_API_KEY=your_custom_api_key_here
|
||||
# CUSTOM_API_URL=https://your-api-gateway.com/v1/chat/completions
|
||||
# CUSTOM_API_KEY=your_custom_api_key_here
|
||||
# CUSTOM_MODEL=your_model_name
|
||||
|
||||
# ========== 前端配置(仅展示,不含密钥) ==========
|
||||
VITE_API_BASE=http://localhost:3001/api
|
||||
# VITE_DEEPSEEK_MODEL=deepseek-chat
|
||||
# VITE_QIANFAN_MODEL=ernie-4.0-8k
|
||||
# VITE_OPENAI_MODEL=gpt-4o
|
||||
# VITE_CLAUDE_MODEL=claude-3-5-sonnet
|
||||
# VITE_CUSTOM_MODEL=your_model_name
|
||||
|
||||
Reference in New Issue
Block a user