Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

fix: cast vector_distance to float in Redis search (#4377)

Utkarsh8230a5dac7db
diff --git a/mem0/vector_stores/redis.py b/mem0/vector_stores/redis.py
index 7fb1ada9e..81617cbd1 100644
--- a/mem0/vector_stores/redis.py
+++ b/mem0/vector_stores/redis.py
@@ -159,7 +159,7 @@ class RedisDB(VectorStoreBase):
return [
MemoryResult(
id=result["memory_id"],
- score=result["vector_distance"],
+ score=float(result["vector_distance"]),
payload={
"hash": result["hash"],
"data": result["memory"],