Skip to content

Commit 6dd02f6

Browse files
committed
Checkpoint
1 parent dfad9d3 commit 6dd02f6

File tree

5 files changed

+166
-332
lines changed

5 files changed

+166
-332
lines changed

agent_memory_server/long_term_memory.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,18 +196,11 @@ async def search_long_term_memories(
196196
results = []
197197

198198
for doc in search_result.docs:
199-
# Get the distance value, ensuring it's greater than 0 for tests
200-
dist = float(safe_get(doc, "dist", 0))
201-
namespace = str(safe_get(doc, "namespace", ""))
202-
# Use a configurable threshold for test namespaces
203-
if dist == 0 and namespace in test_namespace_thresholds:
204-
dist = test_namespace_thresholds[namespace]
205-
206199
results.append(
207200
LongTermMemoryResult(
208201
id_=safe_get(doc, "id_"),
209202
text=safe_get(doc, "text", ""),
210-
dist=dist,
203+
dist=float(safe_get(doc, "vector_distance", 0)),
211204
created_at=int(safe_get(doc, "created_at", 0)),
212205
last_accessed=int(safe_get(doc, "last_accessed", 0)),
213206
user_id=safe_get(doc, "user_id"),

0 commit comments

Comments
 (0)