Skip to content

Commit 476a380

Browse files
committed
fix: align MOSProduct._build_system_prompt signature with MOSCore
- Fix TypeError when calling MOSProduct.chat() method - MOSCore.chat() expects _build_system_prompt(memories, base_prompt=...) - MOSProduct._build_system_prompt had incompatible signature (user_id, memories) - Updated signature to match parent class interface - Removed unused user_id parameter from method
1 parent b572f0f commit 476a380

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/memos/mem_os/product.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def _get_or_create_user_config(
327327

328328
return self._create_user_config(user_id, user_config)
329329

330-
def _build_system_prompt(self, user_id: str, memories_all: list[TextualMemoryItem]) -> str:
330+
def _build_system_prompt(self, memories_all: list[TextualMemoryItem], base_prompt: str | None = None) -> str:
331331
"""
332332
Build custom system prompt for the user with memory references.
333333
@@ -759,7 +759,7 @@ def chat_with_references(
759759
memories_list = memories_result[0]["memories"]
760760

761761
# Build custom system prompt with relevant memories
762-
system_prompt = self._build_system_prompt(user_id, memories_list)
762+
system_prompt = self._build_system_prompt(memories_list, base_prompt=None)
763763

764764
# Get chat history
765765
target_user_id = user_id if user_id is not None else self.user_id

0 commit comments

Comments
 (0)