From d9d661da397f30c7352bdb26b47f2958bd0d8775 Mon Sep 17 00:00:00 2001 From: "jinli.yl" Date: Fri, 23 Jan 2026 11:51:00 +0800 Subject: [PATCH] chore(workflow): add procedural memory module init file --- .../memory/vector}/__init__.py | 0 reme/workflow/procedural_memory/__init__.py | 46 +++++++++++++++++++ .../procedural_memory/retriever/__init__.py | 0 3 files changed, 46 insertions(+) rename reme/{workflow/tool_memory => tool/memory/vector}/__init__.py (100%) create mode 100644 reme/workflow/procedural_memory/retriever/__init__.py diff --git a/reme/workflow/tool_memory/__init__.py b/reme/tool/memory/vector/__init__.py similarity index 100% rename from reme/workflow/tool_memory/__init__.py rename to reme/tool/memory/vector/__init__.py diff --git a/reme/workflow/procedural_memory/__init__.py b/reme/workflow/procedural_memory/__init__.py index e69de29b..a3388dbb 100644 --- a/reme/workflow/procedural_memory/__init__.py +++ b/reme/workflow/procedural_memory/__init__.py @@ -0,0 +1,46 @@ +# summary retriever vector store 的 op + +# 1. BaseAsyncOp -> reme.core.op.BaseOp +# 2. @C.register_op() -> R.op.register()(MergeMemoryOp) +# for name in __all__: +# tool_class = globals()[name] +# R.op.register()(tool_class) +# 3. class name 不一定叫 op +# 4. async def async_execute(self): —》async def execute(self): +# 5. self.llm.chat +# 6. file_path: str = __file__ 不需要 +# 7. self.op_params.get("enable_llm_rerank", True) 都改成 self.context.get("enable_llm_rerank", True) +# +# +# # 跑起来 reme = "reme_ai.main:main" -> reme = "reme.reme_app:main" +# +# app = ReMeApp() +# +# +# def test_search(): +# """Test search tool operations. +# +# Tests DashscopeSearch, MockSearch, and TavilySearch operations +# with a sample query to verify they work correctly. +# """ +# from reme.tool.search import DashscopeSearch, MockSearch, TavilySearch +# +# query = "今天杭州的天气如何?" +# +# for op in [ +# DashscopeSearch(), +# MockSearch(), +# TavilySearch(), +# ]: +# print("\n" + "=" * 60) +# print(f"Testing {op.__class__.__name__}") +# print("=" * 60) +# print(f"Query: {query}") +# output = asyncio.run(op.call(query=query, service_context=app.service_context)) +# +# self.context.query +# app.service_context 保证了 self.llm emb vectorstore + +# examples +# bench 里的llm ,辛苦改成 app = ReMeApp() app.default_llm +# clear && pre-commit run --all-files \ No newline at end of file diff --git a/reme/workflow/procedural_memory/retriever/__init__.py b/reme/workflow/procedural_memory/retriever/__init__.py new file mode 100644 index 00000000..e69de29b