diff --git a/memgpt/data_types.py b/memgpt/data_types.py index aeaf159a3a..dfa48ddae4 100644 --- a/memgpt/data_types.py +++ b/memgpt/data_types.py @@ -246,7 +246,7 @@ def to_openai_dict(self): openai_message["name"] = self.name elif self.role == "assistant": - assert all([v is not None for v in [self.text, self.role]]), vars(self) + assert self.tool_calls is not None or self.text is not None openai_message = { "content": self.text, "role": self.role,