添加 A_Memorix 插件 v2.0.0(包含运行时与文档)
引入 A_Memorix 插件 v2.0.0:新增大量运行时组件、存储/模式更新、检索能力提升、管理工具、导入/调优工作流以及相关文档。关键新增内容包括:lifecycle_orchestrator、SDKMemoryKernel/运行时初始化器、新的存储层与 metadata_store 变更(SCHEMA_VERSION v8)、检索增强(双路径检索、图关系召回、稀疏 BM25),以及多种工具服务(episode/person_profile/relation/segmentation/tuning/search execution)。同时新增 Web 导入/摘要导入器及大量维护脚本。还更新了插件清单、embedding API 适配器、plugin.py、requirements/pyproject,以及主入口文件,使新插件接入项目。该变更为 2.0.0 版本发布做好准备,实现统一的 SDK Tool 接口并扩展整体运行能力。
This commit is contained in:
@@ -285,10 +285,10 @@ class DualPathRetriever:
|
||||
relation_intent_ctx = self._build_relation_intent_context(query=query, top_k=top_k)
|
||||
|
||||
logger.info(
|
||||
"执行检索: query='%s...', strategy=%s, relation_intent=%s",
|
||||
query[:50],
|
||||
strategy.value,
|
||||
relation_intent_ctx.get("enabled", False),
|
||||
"执行检索: "
|
||||
f"query='{query[:50]}...', "
|
||||
f"strategy={strategy.value}, "
|
||||
f"relation_intent={relation_intent_ctx.get('enabled', False)}"
|
||||
)
|
||||
|
||||
if temporal and not (query or "").strip():
|
||||
@@ -1408,10 +1408,10 @@ class DualPathRetriever:
|
||||
return results
|
||||
|
||||
logger.debug(
|
||||
"relation_rerank_applied=1 relation_pair_groups=%s relation_pair_overflow_count=%s relation_pair_limit=%s",
|
||||
len(ordered_groups),
|
||||
len(overflow),
|
||||
pair_limit,
|
||||
"relation_rerank_applied=1 "
|
||||
f"relation_pair_groups={len(ordered_groups)} "
|
||||
f"relation_pair_overflow_count={len(overflow)} "
|
||||
f"relation_pair_limit={pair_limit}"
|
||||
)
|
||||
|
||||
rebuilt = list(results)
|
||||
@@ -1455,9 +1455,9 @@ class DualPathRetriever:
|
||||
)
|
||||
except asyncio.TimeoutError:
|
||||
logger.warning(
|
||||
"metric.ppr_timeout_skip_count=1 timeout_s=%s entities=%s",
|
||||
ppr_timeout_s,
|
||||
len(entities),
|
||||
"metric.ppr_timeout_skip_count=1 "
|
||||
f"timeout_s={ppr_timeout_s} "
|
||||
f"entities={len(entities)}"
|
||||
)
|
||||
return results
|
||||
except Exception as e:
|
||||
|
||||
@@ -170,7 +170,7 @@ class GraphRelationRecallService:
|
||||
max_paths=self.config.max_paths,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.debug("graph two-hop recall skipped: %s", e)
|
||||
logger.debug(f"graph two-hop recall skipped: {e}")
|
||||
return
|
||||
|
||||
for path_nodes in paths:
|
||||
@@ -210,7 +210,7 @@ class GraphRelationRecallService:
|
||||
limit=self.config.candidate_k,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.debug("graph one-hop recall skipped: %s", e)
|
||||
logger.debug(f"graph one-hop recall skipped: {e}")
|
||||
return
|
||||
self._append_relation_hashes(
|
||||
relation_hashes=relation_hashes,
|
||||
|
||||
@@ -123,9 +123,8 @@ class SparseBM25Index:
|
||||
self._loaded = True
|
||||
self._prepare_tokenizer()
|
||||
logger.info(
|
||||
"SparseBM25Index loaded: backend=fts5, tokenizer=%s, mode=%s",
|
||||
self.config.tokenizer_mode,
|
||||
self.config.mode,
|
||||
"SparseBM25Index loaded: "
|
||||
f"backend=fts5, tokenizer={self.config.tokenizer_mode}, mode={self.config.mode}"
|
||||
)
|
||||
return True
|
||||
|
||||
@@ -141,9 +140,9 @@ class SparseBM25Index:
|
||||
if user_dict:
|
||||
try:
|
||||
jieba.load_userdict(user_dict) # type: ignore[union-attr]
|
||||
logger.info("已加载 jieba 用户词典: %s", user_dict)
|
||||
logger.info(f"已加载 jieba 用户词典: {user_dict}")
|
||||
except Exception as e:
|
||||
logger.warning("加载 jieba 用户词典失败: %s", e)
|
||||
logger.warning(f"加载 jieba 用户词典失败: {e}")
|
||||
self._jieba_dict_loaded = True
|
||||
|
||||
def _tokenize_jieba(self, text: str) -> List[str]:
|
||||
|
||||
Reference in New Issue
Block a user