AI Blog 改用 DeepSeek 官方並通用化提示詞

buildSystemPrompt 不再綁死太陽能行業,角色與公司資料改由
後台 ai_context_prompt / ai_business_context 提供;預設供應商
改為 https://api.deepseek.com 與 deepseek-flash。callChat 只在
baseUrl 含 deepseek.com 時加 thinking: { type: "disabled" },
並將 max_tokens 提升至 4000,避免思考模式令 temperature 失效
同正文被截斷。

同步更新 schemas、seed、/admin/ai 預設值同 placeholder,
以及 AGENTS.md、spec、plan 文件。
This commit is contained in:
2026-09-12 00:31:26 +08:00
parent fdee1aabd7
commit 81fc515d6e
11 changed files with 321 additions and 19 deletions
@@ -7,6 +7,7 @@
2. 想有 AI 生成 Blog 文章功能(參考 webtemplate,但簡化、唔要 Google keyword search
3. 部署到 Cloudflare 嘅流程手續多,想更方便
- **本 spec 取代**先前 spec 嘅部署一節;其餘架構決策不變。
- **2026-09-12 更新**AI Blog 提示詞已通用化、預設供應商轉 DeepSeek 官方,詳見 `2026-09-12-ai-blog-template-deepseek-design.md`;下表 `ai_base_url` / `ai_chat_model` 已同步為新預設。
---
@@ -110,8 +111,8 @@ src/lib/form.ts parseForm(formData, schema)
| Key | 預設 | 說明 |
|---|---|---|
| `ai_enabled` | `1` | 總開關 |
| `ai_base_url` | `https://api.deepinfra.com/v1/openai` | OpenAI 相容端點 |
| `ai_chat_model` | `deepseek-ai/DeepSeek-V3-0324` | 模型 |
| `ai_base_url` | `https://api.deepseek.com` | OpenAI 相容端點DeepSeek 官方) |
| `ai_chat_model` | `deepseek-flash` | 模型 |
| `ai_context_prompt` | `""` | 寫作風格 / 語氣 |
| `ai_business_context` | seed 由公司資料砌 | 公司背景(grounding |
| `ai_web_search_enabled` | `0` | Tavily 研究開關 |