File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/memos/memories/textual/tree_text_memory/retrieve Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def retrieve(
6666 working_memories = self .graph_store .get_all_memory_items (
6767 scope = "WorkingMemory" , include_embedding = False , user_name = user_name
6868 )
69- return [TextualMemoryItem .from_dict (record ) for record in working_memories ]
69+ return [TextualMemoryItem .from_dict (record ) for record in working_memories [: top_k ] ]
7070
7171 with ContextThreadPoolExecutor (max_workers = 3 ) as executor :
7272 # Structured graph-based retrieval
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ def post_retrieve(
108108 def search (
109109 self ,
110110 query : str ,
111- top_k : int ,
111+ top_k : int = 10 ,
112112 info = None ,
113113 mode = "fast" ,
114114 memory_type = "All" ,
You can’t perform that action at this time.
0 commit comments