feat(v3): Web 应用化基线(异步任务/SSE/llama-server 管理/Vue SPA 四页 + 设置页整页滚动修复)
This commit is contained in:
+4
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user