- 新增 OutlineWriterPanel 和 OutlineResultPanel 组件 - 重构服务器端数据库接口 (server/db.js) - 添加 LLM 服务模块 (server/llm.js) - 更新配置和设置面板 - 优化文档选择器和素材面板 - 更新部署文档和环境变量示例
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
# AI 写作工坊 - 服务端模型与数据库配置
|
|
# 复制此文件为 .env 并填入服务端 API Key
|
|
|
|
# ========== 服务端 API ==========
|
|
API_PORT=3001
|
|
|
|
# ========== DeepSeek (默认) ==========
|
|
DEEPSEEK_API_URL=https://api.deepseek.com/chat/completions
|
|
DEEPSEEK_API_KEY=your_deepseek_api_key_here
|
|
DEEPSEEK_MODEL=deepseek-chat
|
|
|
|
# ========== 千帆大模型 (百度文心一言) ==========
|
|
# 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 ==========
|
|
# OPENAI_API_URL=https://api.openai.com/v1/chat/completions
|
|
# OPENAI_API_KEY=your_openai_api_key_here
|
|
# OPENAI_MODEL=gpt-4o
|
|
|
|
# ========== Claude (Anthropic) ==========
|
|
# CLAUDE_API_URL=https://api.anthropic.com/v1/messages
|
|
# CLAUDE_API_KEY=your_claude_api_key_here
|
|
# CLAUDE_MODEL=claude-3-5-sonnet
|
|
|
|
# ========== 自定义 API 中继 ==========
|
|
# 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
|