From a4e92403161f73bbcf757f0645ecf1691e333c93 Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Mon, 6 Nov 2023 21:53:49 -0800 Subject: [PATCH] add gpt-4-turbo (#349) * add gpt-4-turbo * add in another place * change to 3.5 16k --- memgpt/cli/cli_config.py | 4 ++-- memgpt/config.py | 6 +++++- memgpt/main.py | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/memgpt/cli/cli_config.py b/memgpt/cli/cli_config.py index 2933a9c8..bee84f9a 100644 --- a/memgpt/cli/cli_config.py +++ b/memgpt/cli/cli_config.py @@ -95,9 +95,9 @@ def configure(): if use_openai or use_azure: model_options = [] if use_openai: - model_options += ["gpt-3.5-turbo", "gpt-3.5", "gpt-4"] + model_options += ["gpt-4", "gpt-4-1106-preview", "gpt-3.5-turbo-16k"] default_model = questionary.select( - "Select default model (recommended: gpt-4):", choices=["gpt-3.5-turbo", "gpt-3.5", "gpt-4"], default="gpt-4" + "Select default model (recommended: gpt-4):", choices=["gpt-4", "gpt-4-1106-preview", "gpt-3.5-turbo-16k"], default="gpt-4" ).ask() else: default_model = "local" # TODO: figure out if this is ok? this is for local endpoint diff --git a/memgpt/config.py b/memgpt/config.py index 18c7f1eb..30fe5306 100644 --- a/memgpt/config.py +++ b/memgpt/config.py @@ -28,9 +28,13 @@ from memgpt.presets import DEFAULT_PRESET, preset_options model_choices = [ questionary.Choice("gpt-4"), + questionary.Choice( + "gpt-4-turbo (developer preview)", + value="gpt-4-1106-preview", + ), questionary.Choice( "gpt-3.5-turbo (experimental! function-calling performance is not quite at the level of gpt-4 yet)", - value="gpt-3.5-turbo", + value="gpt-3.5-turbo-16k", ), ] diff --git a/memgpt/main.py b/memgpt/main.py index 40421a88..43b0b6b8 100644 --- a/memgpt/main.py +++ b/memgpt/main.py @@ -500,8 +500,8 @@ async def run_agent_loop(memgpt_agent, first, no_verify=False, cfg=None, strip_u elif user_input.lower() == "/model": if memgpt_agent.model == "gpt-4": - memgpt_agent.model = "gpt-3.5-turbo" - elif memgpt_agent.model == "gpt-3.5-turbo": + memgpt_agent.model = "gpt-3.5-turbo-16k" + elif memgpt_agent.model == "gpt-3.5-turbo-16k": memgpt_agent.model = "gpt-4" print(f"Updated model to:\n{str(memgpt_agent.model)}") continue