Skip to content

Commit

Permalink
fix: allow edge case of quickstart before run on first install (letta…
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacker authored and norton120 committed Feb 15, 2024
1 parent 0be4539 commit 2c83467
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions memgpt/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ def quickstart(
if debug:
logging.getLogger().setLevel(logging.DEBUG)

# make sure everything is set up properly
MemGPTConfig.create_config_dir()

config_was_modified = False
if backend == QuickstartChoice.memgpt_hosted:
# if latest, try to pull the config from the repo
Expand Down Expand Up @@ -324,15 +327,11 @@ def run(

if config_selection == config_choices["memgpt"]:
print()
MemGPTConfig.create_config_dir()
quickstart(backend=QuickstartChoice.memgpt_hosted, debug=debug, terminal=False, latest=False)
elif config_selection == config_choices["openai"]:
print()
MemGPTConfig.create_config_dir()
quickstart(backend=QuickstartChoice.openai, debug=debug, terminal=False, latest=False)
elif config_selection == config_choices["other"]:
# create_config_dir() is run inside configure()
# MemGPTConfig.create_config_dir()
configure()
else:
raise ValueError(config_selection)
Expand Down

0 comments on commit 2c83467

Please sign in to comment.