feat:客户agent以及记忆模块优化

This commit is contained in:
2026-09-12 19:56:48 +08:00
parent 30160128a4
commit 3103389aec
10 changed files with 86 additions and 54 deletions
+8
View File
@@ -70,6 +70,14 @@ class MemoryService:
warnings.extend(self.short_term.last_warnings)
async with self._db() as db:
try:
refresh_confidence = getattr(self.long_term, "refresh_confidence", None)
if refresh_confidence is not None:
await refresh_confidence(
db, customer_id, limit=max(limit, 10)
)
except Exception as exc:
warnings.append(f"confidence_refresh_failed:{type(exc).__name__}")
profile, profile_warnings = await self.profile.get(db, customer_id)
warnings.extend(profile_warnings)
try: