联网搜索能力集成: opencode webfetch → 采集器

新增:
- scripts/opencode_search.py: 通过 npx opencode run 调用 webfetch 联网搜索
- 搜索缓存每日 02:30 自动刷新 (scheduler)
- 管理后台「搜索缓存」模块 + 立即运行按钮
- POST /api/system/refresh-search-cache/run 手动触发端点
- 8个分类搜索词从sources.yaml读取,调用AI联网搜索真实内容

机制:
  Python脚本 → npx opencode run → AI webfetch → 真实搜索结果 → 写入search_cache.json
  → 采集器读缓存 → LLM基于真实数据生成选题

不再需要API Key,不依赖任何搜索引擎,搜索结果来自AI的webfetch能力
This commit is contained in:
Yuzhiran Dev
2026-05-21 09:01:02 +08:00
parent 7d50878c7d
commit 6f81167691
5 changed files with 256 additions and 47 deletions
+1
View File
@@ -285,6 +285,7 @@
this.runningModule = modId;
const endpoints = {
scheduled_collect: '/api/system/collect/run',
scheduled_refresh_search_cache: '/api/system/refresh-search-cache/run',
scheduled_fetch_trends: '/api/system/trends/run',
scheduled_generate: '/api/system/generate/run',
scheduled_optimize: '/api/system/review/run',