This commit is contained in:
sophie committed 2026-09-07 11:13:33 +08:00
1 parent 78576f5745
commit 63b997a7e4
68 files changed
+3680 -1413

No files matched your search

+2 -1
View File
@@ -64,7 +64,7 @@ flowchart TD
A[用户发消息 chat.py] --> B{有附件?}
B -->|是| Z[跳过 FAQ,走业务路由]
B -->|否| C[FaqCacheService.try_match]
C --> D{agent 全局 FAQ<br/>cache_enabled=true<br/>is_enabled=true<br/>stale_at 为空<br/>未过期?}
C --> D{agent 全局 FAQ<br/>cache_enabled=true<br/>stale_at 为空<br/>未过期?}
D -->|否| E[未命中 → Dify 等]
D -->|是| F{归一化问句匹配<br/>question / title / aliases?}
F -->|否| E
@@ -283,6 +283,7 @@ FAQ_HOT_BAD_SCORE=2
| --- | --- |
| 新建/编辑 | 填写 question、answer、aliases;开启「启用缓存」 |
| 关闭缓存 | `cache_enabled=false` 后不再在线命中,但不删 ChatLog |
| 关闭前台展示 | `is_enabled=false` 后工作台首页不显示快捷入口,**不影响** FAQ 缓存命中 |
| 设置过期 | `expires_at` 到期后 `try_match` 自动跳过 |
| 查看命中 | 列表字段 `hit_count` |