Skip to content

Build and run agents you can see, understand and trust.

fix(tutorial, mem0): fix the bug in mem0 and the typos in tutorial (#1114)

DavdGaodbb00d17a59f
diff --git a/.gitignore b/.gitignore
index 56edd3304..52a5a7cf3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -141,4 +141,11 @@ docs/tutorial/zh_CN/build/
docs/tutorial/**/doctrees/
docs/tutorial/**/.doctrees/
*.buildinfo
-*.pickle
\ No newline at end of file
+*.pickle
+
+node_modules/
+package-lock.json
+*.tsbuildinfo
+.wireit/
+.angular/
+*.ts
\ No newline at end of file
diff --git a/docs/tutorial/en/src/task_prompt.py b/docs/tutorial/en/src/task_prompt.py
index 02e9e8728..047e35611 100644
--- a/docs/tutorial/en/src/task_prompt.py
+++ b/docs/tutorial/en/src/task_prompt.py
@@ -221,8 +221,8 @@ input_msgs = [
),
# Conversation history continues
Msg("Friday", "The nearest library is ...", "assistant"),
- Msg("Bob", "Thanks, Friday!", "user"),
- Msg("Alice", "Let's go together.", "user"),
+ Msg("Bob", "Thanks, Friday!", "assistant"),
+ Msg("Alice", "Let's go together.", "assistant"),
]
diff --git a/docs/tutorial/zh_CN/src/task_prompt.py b/docs/tutorial/zh_CN/src/task_prompt.py
index aa1eb04ca..3d5cc9dfe 100644
--- a/docs/tutorial/zh_CN/src/task_prompt.py
+++ b/docs/tutorial/zh_CN/src/task_prompt.py
@@ -221,8 +221,8 @@ input_msgs = [
),
# 对话历史继续
Msg("Friday", "最近的图书馆是...", "assistant"),
- Msg("Bob", "谢谢,Friday!", "user"),
- Msg("Alice", "我们一起去吧。", "user"),
+ Msg("Bob", "谢谢,Friday!", "assistant"),
+ Msg("Alice", "我们一起去吧。", "assistant"),
]
diff --git a/src/agentscope/memory/_long_term_memory/_mem0/_mem0_long_term_memory.py b/src/agentscope/memory/_long_term_memory/_mem0/_mem0_long_term_memory.py
index d8300f943..06df4ef22 100644
--- a/src/agentscope/memory/_long_term_memory/_mem0/_mem0_long_term_memory.py
+++ b/src/agentscope/memory/_long_term_memory/_mem0/_mem0_long_term_memory.py
@@ -152,18 +152,21 @@ class Mem0LongTermMemory(LongTermMemoryBase):
# Register the agentscope providers with mem0
- EmbedderFactory.provider_to_class[
- "agentscope"
- ] = "agentscope.memory._mem0_utils.AgentScopeEmbedding"
+ EmbedderFactory.provider_to_class["agentscope"] = (
+ "agentscope.memory._long_term_memory._mem0."
+ "_mem0_utils.AgentScopeEmbedding"
+ )
if is_mem0_version_low:
# For mem0 version <= 0.1.115, use the old style
- LlmFactory.provider_to_class[
- "agentscope"
- ] = "agentscope.memory._mem0_utils.AgentScopeLLM"
+ LlmFactory.provider_to_class["agentscope"] = (
+ "agentscope.memory._long_term_memory._mem0."
+ "_mem0_utils.AgentScopeLLM"
+ )
else:
# For mem0 version > 0.1.115, use the new style
LlmFactory.provider_to_class["agentscope"] = (
- "agentscope.memory._mem0_utils.AgentScopeLLM",
+ "agentscope.memory._long_term_memory._mem0."
+ "_mem0_utils.AgentScopeLLM",
BaseLlmConfig,
)