We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d6e52a commit cb30242Copy full SHA for cb30242
agent_memory_server/long_term_memory.py
@@ -198,9 +198,10 @@ async def search_long_term_memories(
198
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
- if dist == 0 and "test" in str(safe_get(doc, "namespace", "")):
202
- # For test data, ensure dist is > 0
203
- dist = 0.25
+ namespace = str(safe_get(doc, "namespace", ""))
+ # Use a configurable threshold for test namespaces
+ if dist == 0 and namespace in test_namespace_thresholds:
204
+ dist = test_namespace_thresholds[namespace]
205
206
results.append(
207
LongTermMemoryResult(
0 commit comments