File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -563,7 +563,7 @@ def search(
563563 Returns:
564564 MemoryResult: A dictionary containing the search results.
565565 """
566- target_user_id = user_id if user_id is not None else self .user_ids
566+ target_user_id = user_id if user_id is not None else self .user_id
567567
568568 self ._validate_user_exists (target_user_id )
569569 # Get all cubes accessible by the target user
Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ def test_init(self):
4343 def test_process_chat_data (self ):
4444 """Test processing chat data into memory items."""
4545 scene_data_info = [
46- " user: Hello" ,
47- " assistant: Hi there" ,
48- " user: How are you?" ,
46+ { "role" : " user" , "content" : " Hello"} ,
47+ { "role" : " assistant" , "content" : " Hi there"} ,
48+ { "role" : " user" , "content" : " How are you?"} ,
4949 ]
5050 info = {"user_id" : "user1" , "session_id" : "session1" }
5151
@@ -115,7 +115,14 @@ def test_get_scene_data_info_with_chat(self):
115115
116116 self .assertIsInstance (result , list )
117117 self .assertEqual (len (result ), 1 )
118- self .assertEqual (result [0 ][0 ], "user: [3 May 2025]: I'm feeling a bit down today." )
118+ self .assertEqual (
119+ result [0 ][0 ],
120+ {
121+ "role" : "user" ,
122+ "chat_time" : "3 May 2025" ,
123+ "content" : "I'm feeling a bit down today." ,
124+ },
125+ )
119126
120127 @patch ("memos.mem_reader.simple_struct.ParserFactory" )
121128 def test_get_scene_data_info_with_doc (self , mock_parser_factory ):
You can’t perform that action at this time.
0 commit comments