Skip to content

Commit 61f64dc

Browse files
author
久氢
committed
feat: memorycollection implement
Change-Id: I187d0e5d54abc79d4ed3d256253bd442988a9ff7 Co-developed-by: Cursor <noreply@cursor.com> Signed-off-by: 久氢 <mapenghui.mph@alibaba-inc.com>
1 parent fb3645b commit 61f64dc

File tree

9 files changed

+1239
-10
lines changed

9 files changed

+1239
-10
lines changed

agentrun/memory_collection/__memory_collection_async_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ async def to_mem0_memory_async(
250250
>>> memory.add("用户喜欢吃苹果", user_id="user123")
251251
"""
252252
try:
253-
from mem0 import Memory
253+
from agentrun_mem0 import Memory
254254
except ImportError as e:
255255
raise ImportError(
256256
"agentrun-mem0ai package is required. Install it with: pip"

agentrun/memory_collection/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def create(
8585
input: MemoryCollectionCreateInput,
8686
config: Optional[Config] = None,
8787
):
88-
"""创建记忆集合(同步) / Create memory collection asynchronously
88+
"""创建记忆集合(同步) / Create memory collection synchronously
8989
9090
Args:
9191
input: 记忆集合输入参数 / Memory collection input parameters

agentrun/memory_collection/memory_collection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ async def to_mem0_memory_async(
429429
>>> memory.add("用户喜欢吃苹果", user_id="user123")
430430
"""
431431
try:
432-
from mem0 import Memory
432+
from agentrun_mem0 import Memory
433433
except ImportError as e:
434434
raise ImportError(
435435
"agentrun-mem0ai package is required. Install it with: pip"
@@ -478,7 +478,7 @@ def to_mem0_memory(
478478
>>> memory.add("用户喜欢吃苹果", user_id="user123")
479479
"""
480480
try:
481-
from mem0 import Memory
481+
from agentrun_mem0 import Memory
482482
except ImportError as e:
483483
raise ImportError(
484484
"agentrun-mem0ai package is required. Install it with: pip"

agentrun/memory_collection/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Defines data models and enumerations related to memory collections.
55
"""
66

7-
from typing import Any, Dict, List, Optional
7+
from typing import List, Optional
88

99
from agentrun.utils.config import Config
1010
from agentrun.utils.model import BaseModel, PageableInput

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ dependencies = [
1313
"litellm>=1.79.3",
1414
"alibabacloud-devs20230714>=2.4.1",
1515
"pydash>=8.0.5",
16-
"alibabacloud-agentrun20250910>=5.0.1",
16+
"alibabacloud-agentrun20250910>=5.2.0",
1717
"alibabacloud_tea_openapi>=0.4.2",
1818
"alibabacloud_bailian20231229>=2.6.2",
19+
"agentrun-mem0ai>=0.0.6",
1920
]
2021

2122
[project.optional-dependencies]
@@ -54,10 +55,6 @@ mcp = [
5455
"mcp>=1.21.2; python_version >= '3.10'",
5556
]
5657

57-
mem0 = [
58-
"agentrun-mem0ai>=0.0.3",
59-
]
60-
6158
[dependency-groups]
6259
dev = [
6360
"coverage>=7.10.7",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""测试 agentrun.memory_collection 模块 / Test agentrun.memory_collection module"""

0 commit comments

Comments
 (0)