This commit is contained in:
Timothy J. Baek 2024-05-19 08:47:37 -07:00
parent bbdfcd18e1
commit 0d07d10bd8

View File

@ -120,6 +120,7 @@ async def delete_memory_by_id(memory_id: str, user=Depends(get_verified_user)):
collection = CHROMA_CLIENT.get_or_create_collection( collection = CHROMA_CLIENT.get_or_create_collection(
name=f"user-memory-{user.id}" name=f"user-memory-{user.id}"
) )
collection.delete_document(memory_id) collection.delete(ids=[memory_id])
return True return True
return False return False