diff --git a/.env.example b/.env.example index 0691bb7..b5eea7a 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,22 @@ -# DeepSeek API 配置 -VITE_API_URL=https://api.deepseek.com/chat/completions -VITE_API_KEY=your_deepseek_api_key_here +# AI 写作工坊 - 模型服务商配置 +# 复制此文件为 .env 并填入您的 API Key -# 其他中继平台配置示例 -# VITE_API_URL=https://your-kong-gateway.com/v1/chat/completions -# VITE_API_KEY=your_bearer_token_here +# ========== 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 + +# ========== 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 + +# ========== 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 + +# ========== 自定义 API 中继 ========== +# VITE_CUSTOM_API_URL=https://your-api-gateway.com/v1/chat/completions +# VITE_CUSTOM_API_KEY=your_custom_api_key_here +# VITE_CUSTOM_MODEL=your_model_name diff --git a/src/App.vue b/src/App.vue index c444bac..5e0c0c0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -19,6 +19,7 @@ + appStore.currentPage) diff --git a/src/components/AnalysisPanel.vue b/src/components/AnalysisPanel.vue index cfdab8b..07dfb77 100644 --- a/src/components/AnalysisPanel.vue +++ b/src/components/AnalysisPanel.vue @@ -8,22 +8,47 @@ Pro版 - -
- -
-
-

📚 写作范式库

- -
+ +
+ + +
-
-
+
+ +
+
+ {{ paradigms.length }} 个范式 +
+ + +
+
+ +
+
{{ paradigm.icon }} {{ paradigm.name }} NEW - 自定义 + 自定义 + + {{ formatDate(paradigm.createdAt) }} +
@@ -71,194 +99,71 @@
-
-
- - -
-

🔍 范式分析工具

- -
- - -
-
- - -
-

📝 分析历史

-
-
-
- {{ item.paradigm }} - {{ formatDate(item.timestamp) }} -
-

{{ item.preview }}

-
-
+
+ + +
+

🔍 范式分析工具

+ +
+ + +
+ + +
+

📝 分析历史

+
+
+
+ {{ item.paradigm }} + {{ formatDate(item.timestamp) }} +
+

{{ item.preview }}

+
+
+
+
- -
-
-
-

{{ isAddMode ? '新增写作范式' : '编辑写作范式' }}

- -
- -
- -
- -
- -
-
- - -
- - -
- - -
- - -
- - -
- - -
- - {{ tag }} - -
-
- - -
- -
- -
-
- - -
- - -

- 💡 提示:这是 AI 调用时的核心指令。完整的 Prompt 应包含角色、目标、步骤和输出格式。 -

-
-
- -
- - -
-
-
+ + diff --git a/src/components/SettingsPanel.vue b/src/components/SettingsPanel.vue index 65e2b87..4af2df3 100644 --- a/src/components/SettingsPanel.vue +++ b/src/components/SettingsPanel.vue @@ -11,6 +11,52 @@
+ +
+

+ 🤖 AI 模型设置 +

+
+
+ + +
+ + +
+
+ API 端点 + {{ currentProvider?.apiUrl || '未配置' }} +
+
+ API Key + + {{ currentProvider?.apiKey ? '✓ 已配置' : '✗ 未配置' }} + +
+
+ 默认模型 + {{ currentProvider.model }} +
+
+ +

+ 💡 模型配置通过 .env 文件设置,详见项目文档 +

+
+
+

@@ -150,10 +196,18 @@