MCPcopy Create free account
hub / github.com/MemTensor/MemOS / search

Method search

evaluation/scripts/utils/client.py:123–132  ·  view source on GitHub ↗
(self, query, user_id, top_k)

Source from the content-addressed store, hash-verified

121 raise e
122
123 def search(self, query, user_id, top_k):
124 real_uid = self.string_to_uuid(user_id)
125 user = self.client.get_user(real_uid, no_get=True)
126 memories = user.context(
127 max_token_size=top_k * 100,
128 chats=[{"role": "user", "content": query}],
129 event_similarity_threshold=0.2,
130 fill_window_with_events=True,
131 )
132 return memories
133
134 def delete_user(self, user_id):
135 from memobase.error import ServerError

Callers

nothing calls this directly

Calls 2

string_to_uuidMethod · 0.95
get_userMethod · 0.45

Tested by

no test coverage detected