From d8092351016f4a32a01fe3685d4cccf7d2c2a679 Mon Sep 17 00:00:00 2001 From: cpacker Date: Mon, 13 Nov 2023 14:40:00 -0800 Subject: [PATCH] patch getargspec error --- memgpt/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/memgpt/config.py b/memgpt/config.py index c57ed4b6cd..ec96d7aaeb 100644 --- a/memgpt/config.py +++ b/memgpt/config.py @@ -342,7 +342,11 @@ def load(cls, name: str): agent_config = json.load(f) # allow compatibility accross versions - class_args = inspect.getargspec(cls.__init__).args + try: + class_args = inspect.getargspec(cls.__init__).args + except AttributeError: + # https://github.com/pytorch/pytorch/issues/15344 + class_args = inspect.getfullargspec(cls.__init__).args agent_fields = list(agent_config.keys()) for key in agent_fields: if key not in class_args: