Skip to content

Commit

Permalink
Revert last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Jul 20, 2023
1 parent e725991 commit cc2c98b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions agentmemory/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def create_memory(category, text, metadata={}, embedding=None, id=None):
# if the field is a boolean, convert it to a string
for key, value in metadata.items():
if isinstance(value, bool):
print(f"WARNING: Boolean metadata field {key} converted to string")
metadata[key] = str(value)

# insert the document into the collection
Expand Down Expand Up @@ -286,6 +287,7 @@ def update_memory(category, id, text=None, metadata=None):
# for each key value in metadata -- if the type is boolean, convert it to string
for key, value in metadata.items():
if isinstance(value, bool):
print(f"WARNING: Boolean metadata field {key} converted to string")
metadata[key] = str(value)

metadata["updated_at"] = datetime.datetime.now().timestamp()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name='agentmemory',
version='0.2.12',
version='0.2.11',
description='Easy-to-use agent memory, powered by chromadb',
long_description=long_description, # added this line
long_description_content_type="text/markdown", # and this line
Expand Down

0 comments on commit cc2c98b

Please sign in to comment.