allow extensionless /load arg

This commit is contained in:
cpacker
2023-10-19 16:15:05 -07:00
parent 2f60ede75c
commit edfff5cdc8

View File

@@ -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}")