Commit Graph

6 Commits

Author SHA1 Message Date
67b2dac23f slidesConfig 结构错误 — migrate_017 输出改为数组格式,migrate_019 修复历史数据
迁移系统加固 — 加 advisory lock 防并发,失败回滚并中止启动(原来是 catch-and-continue)
安全漏洞 — Settings/History API 权限收紧,API key 返回掩码值,海报 case 所有权校验
依赖缺失 — requirements.txt 补齐 python-pptx/openai/Pillow,Dockerfile 改为统一安装
海报鉴权下载 — 前端全部改用 authenticated blob,不再 window.open 无 token URL
LLM 配置分离 — 海报文案读取 poster_llm_*(不再复用 ppt_llm_*),支持 config namespace
图片生成器 — 兼容 b64_json 和 URL 两种响应格式,追踪 generation_mode/provider/model
种子数据 — 新环境自动获得 2 个海报模板 + 2 个文案模板
2026-07-27 13:21:34 +08:00
48f6388554 0727 PPT加海报功能02修复一个版本 2026-07-27 10:37:00 +08:00
dbe2f9202d feat: support direct LLM provider config with model sync
- Fix _call_provider to support custom providers (OpenAI-compatible
  fallback) instead of raising ValueError for unknown providers
- Add POST /admin/ppt/sync-models endpoint that fetches available
  models from the configured provider's API
- Redesign PptSettingsAdmin UI: replace Dify model dropdown with
  per-provider 'sync models' button + searchable model selector
- Remove dead Dify-specific code (fetchDifyModels, applyDifyModel)
- Update deepseek default model from deepseek-chat to deepseek-v4-pro
- API Key field now always shown (not conditional on non-dify)
2026-07-25 13:45:32 +08:00
3a0f4f6830 feat: support Dify-synced models without separate API key
When a model is selected from Dify, set provider='dify' and call
through Dify Chat API (/v1/chat-messages) using the existing
DIFY_CHAT_APP_API_KEY. No separate API key configuration needed.

- Frontend: hide API Key/Base URL fields when provider is 'dify',
  show 'via Dify, no API key needed' tag
- Backend: add _call_dify() to route through Dify Chat API
- Backend: _try_load_db_config supports dify provider without api_key

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 16:18:59 +08:00
c8e0c0bb1e feat: add model configuration for PPT and poster generation
- PptSettingsAdmin.vue: full settings page with provider/model/API key
  config for PPT extraction, poster copy, and poster image generation
- Backend: GET /insurance/admin/ppt/available-models to fetch models
  from Dify API (falls back to builtin list when unavailable)
- LLM client: read model config from SystemSetting DB with 60s cache,
  priority: database > environment variables > defaults
- ppt-admin-api.ts: add getAvailableModels() method

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 13:46:04 +08:00
4a556a1cc7 0723 PPT功能初步融合 2026-07-23 13:10:50 +08:00