feat(v3): Web 应用化基线(异步任务/SSE/llama-server 管理/Vue SPA 四页 + 设置页整页滚动修复)

This commit is contained in:
tzt
2026-09-01 08:31:47 +08:00
parent 8d36eeec59
commit 3bbdcb7cc7
60 changed files with 7236 additions and 1160 deletions
+4 -4
View File
@@ -13,9 +13,9 @@ def test_exact_hit():
def test_semantic_hit():
c = RouterCache(semantic_enabled=True, similarity_threshold=0.5)
c.put("?python?????", {"response": "code", "domain": "code"})
# ?????????? L2
hit = c.get("?python????????")
c.put("python写一个快速排序", {"response": "code", "domain": "code"})
# 相似改写查询命中 L2 语义缓存
hit = c.get("python写一个快速排序算法")
assert hit is not None
assert hit[0] == "semantic"
@@ -24,7 +24,7 @@ def test_promote_to_exact():
c = RouterCache(promote_frequency=3)
result = {"response": "x", "domain": "general"}
c.put("query", result)
# ?????? 3 ? ? ???????
# 语义命中 3 次后提升为精确缓存
for _ in range(3):
hit = c.get("query")
assert hit is not None