Skip to content

Commit

Permalink
add gpt-4-turbo (#349)
Browse files Browse the repository at this point in the history
* add gpt-4-turbo

* add in another place

* change to 3.5 16k
  • Loading branch information
cpacker authored and sarahwooders committed Nov 9, 2023
1 parent 66ebfed commit 18306da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions memgpt/cli/cli_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion memgpt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@

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",
),
]

Expand Down
4 changes: 2 additions & 2 deletions memgpt/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 18306da

Please sign in to comment.