Skip to content

Commit 5dece52

Browse files
committed
fix:change user_id
1 parent 5b51bec commit 5dece52

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/memos/mem_os/product.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -764,11 +764,10 @@ def chat_with_references(
764764
system_prompt = self._build_system_prompt(user_id, memories_list)
765765

766766
# Get chat history
767-
target_user_id = user_id if user_id is not None else self.user_id
768-
if target_user_id not in self.chat_history_manager:
769-
self._register_chat_history(target_user_id)
767+
if user_id not in self.chat_history_manager:
768+
self._register_chat_history(user_id)
770769

771-
chat_history = self.chat_history_manager[target_user_id]
770+
chat_history = self.chat_history_manager[user_id]
772771
current_messages = [
773772
{"role": "system", "content": system_prompt},
774773
*chat_history.chat_history,

0 commit comments

Comments
 (0)