Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

Fix model configuration for when `config.model == "local"` previously (#415)

Sarah Wooders551952083b19
diff --git a/memgpt/cli/cli_config.py b/memgpt/cli/cli_config.py
index b6175bcec..132d05274 100644
--- a/memgpt/cli/cli_config.py
+++ b/memgpt/cli/cli_config.py
@@ -122,8 +122,9 @@ def configure():
model_options = []
if use_openai:
model_options += ["gpt-4", "gpt-4-1106-preview", "gpt-3.5-turbo-16k"]
+ valid_model = config.model in model_options
default_model = questionary.select(
- "Select default model (recommended: gpt-4):", choices=["gpt-4", "gpt-4-1106-preview", "gpt-3.5-turbo-16k"], default=config.model
+ "Select default model (recommended: gpt-4):", choices=model_options, default=config.model if valid_model else model_options[0]
).ask()
else:
default_model = "local" # TODO: figure out if this is ok? this is for local endpoint