[bug_improvement]: Update hash changed and Vector base class improved (#2034)
This commit is contained in:
@@ -582,7 +582,7 @@ class Memory(MemoryBase):
|
||||
|
||||
new_metadata = metadata or {}
|
||||
new_metadata["data"] = data
|
||||
new_metadata["hash"] = existing_memory.payload.get("hash")
|
||||
new_metadata["hash"] = hashlib.md5(data.encode()).hexdigest()
|
||||
new_metadata["created_at"] = existing_memory.payload.get("created_at")
|
||||
new_metadata["updated_at"] = datetime.now(pytz.timezone("US/Pacific")).isoformat()
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class VectorStoreBase(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def delete_col(self, name):
|
||||
def delete_col(self):
|
||||
"""Delete a collection."""
|
||||
pass
|
||||
|
||||
@@ -46,3 +46,8 @@ class VectorStoreBase(ABC):
|
||||
def col_info(self, name):
|
||||
"""Get information about a collection."""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def list(self, filters=None, limit=None):
|
||||
"""List all memories."""
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user