From edfff5cdc8fc24336fc0f0a3cea867877378283b Mon Sep 17 00:00:00 2001 From: cpacker Date: Thu, 19 Oct 2023 16:15:05 -0700 Subject: [PATCH] allow extensionless /load arg --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index fcddd267..3cb1010b 100644 --- a/main.py +++ b/main.py @@ -169,6 +169,8 @@ async def main(): command = user_input.strip().split() filename = command[1] if len(command) > 1 else None if filename is not None: + if filename[-5:] != '.json': + filename += '.json' try: memgpt_agent.load_from_json_file_inplace(filename) print(f"Loaded checkpoint {filename}")