feat: semantic (embedding-based) response cache

- cache.rs: cosine-similarity store (threshold, TTL, ring buffer), partitioned by
  routing signature; tracks hit rate and model cost saved
- pipeline: embed routing text, look up before the model call (route_source=cache on
  hit), insert successful responses; stats record cache hits
- config [cache] + admin settings card; dashboard shows hit-rate and savings
- embedding model resolved from the pool (or first kind="embedding")
This commit is contained in:
infosave2007
2026-06-30 17:04:53 +03:00
parent bf8534f13d
commit 5759de153b
17 changed files with 492 additions and 5 deletions
+11
View File
@@ -254,4 +254,15 @@ export default {
"toast.deleted": "Silindi",
"toast.probing": "Sınanıyor…",
"toast.imported": "Yapılandırma içe aktarıldı",
"dash.cache": "Anlamsal önbellek",
"dash.cache.hitRate": "İsabet oranı",
"dash.cache.hits": "İsabet",
"dash.cache.saved": "Tasarruf",
"dash.cache.disabled": "Anlamsal önbellek kapalı — Ayarlar'dan etkinleştirin.",
"settings.cache": "Anlamsal önbellek",
"settings.cache.enabled": "Anlamsal önbelleği etkinleştir",
"settings.cache.threshold": "Benzerlik eşiği",
"settings.cache.ttl": "Giriş TTL",
"settings.cache.embed": "Gömme modeli",
"settings.cache.note": "Anlamsal önbellek ayarları yeniden başlatmadan sonra geçerli olur.",
};