fix: surfacing properly supported types by Mem0Storage

This commit is contained in:
lucasgomide
2025-03-31 11:44:45 -03:00
committed by Lucas Gomide
parent 9b51e1174c
commit 13115c68bd

View File

@@ -13,9 +13,12 @@ class Mem0Storage(Storage):
def __init__(self, type, crew=None):
super().__init__()
if type not in ["user", "short_term", "long_term", "entities"]:
raise ValueError("Invalid type for Mem0Storage. Must be 'user' or 'agent'.")
supported_types = ["user", "short_term", "long_term", "entities"]
if type not in supported_types:
raise ValueError(
"Invalid type for Mem0Storage. Must be one of: "
+ ", ".join(supported_types)
)
self.memory_type = type
self.crew = crew