fix(vector_stores): return None from Redis.get() for missing IDs (#5625)
Co-authored-by: ly-wang19 <ly-wang19@users.noreply.github.com> Co-authored-by: Kartik <kartik.labhshetwar@mem0.ai>
This commit is contained in:
co-authored by
ly-wang19
Kartik
parent
ff53fd60b7
commit
c5971193a2
@@ -263,6 +263,8 @@ class RedisDB(VectorStoreBase):
|
||||
|
||||
def get(self, vector_id):
|
||||
result = self.index.fetch(vector_id)
|
||||
if result is None:
|
||||
return None
|
||||
payload = {
|
||||
"hash": result["hash"],
|
||||
"data": result["memory"],
|
||||
|
||||
Reference in New Issue
Block a user