Skip to content

Commit

Permalink
Updated usages of 3.5-turbo to 4o-mini and 4o-turbo to 4o
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanideByte committed Aug 21, 2024
1 parent aebdd0f commit 3d85e46
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion interpreter/core/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(self, interpreter):
self.completions = fixed_litellm_completions

# Settings
self.model = "gpt-4-turbo"
self.model = "gpt-4o"
self.temperature = 0

self.supports_vision = None # Will try to auto-detect
Expand Down
4 changes: 2 additions & 2 deletions interpreter/terminal_interface/profiles/defaults/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# LLM Settings
llm:
model: "gpt-4-turbo"
model: "gpt-4o"
temperature: 0
# api_key: ... # Your API key, if the API requires it
# api_base: ... # The URL where an OpenAI-compatible server is running to handle LLM API requests
Expand All @@ -26,7 +26,7 @@ computer:

# To use a separate model for the `wtf` command:
# wtf:
# model: "gpt-3.5-turbo"
# model: "gpt-4o-mini"

# Documentation
# All options: https://docs.openinterpreter.com/settings
2 changes: 1 addition & 1 deletion interpreter/terminal_interface/profiles/defaults/fast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Remove the "#" before the settings below to use them.

llm:
model: "gpt-3.5-turbo"
model: "gpt-4o-mini"
temperature: 0
# api_key: ... # Your API key, if the API requires it
# api_base: ... # The URL where an OpenAI-compatible server is running to handle LLM API requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# LLM Settings
llm:
model: "gpt-4-turbo"
model: "gpt-4o"
temperature: 0
# api_key: ... # Your API key, if the API requires it
# api_base: ... # The URL where an OpenAI-compatible server is running to handle LLM API requests
Expand Down
8 changes: 4 additions & 4 deletions interpreter/terminal_interface/profiles/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ def apply_profile(interpreter, profile, profile_path):

try:
if profile["llm"]["model"] == "gpt-4":
text = text.replace("gpt-4", "gpt-4-turbo")
profile["llm"]["model"] = "gpt-4-turbo"
text = text.replace("gpt-4", "gpt-4o")
profile["llm"]["model"] = "gpt-4o"
elif profile["llm"]["model"] == "gpt-4-turbo-preview":
text = text.replace("gpt-4-turbo-preview", "gpt-4-turbo")
profile["llm"]["model"] = "gpt-4-turbo"
text = text.replace("gpt-4-turbo-preview", "gpt-4o")
profile["llm"]["model"] = "gpt-4o"
except:
raise
pass # fine
Expand Down
2 changes: 1 addition & 1 deletion interpreter/terminal_interface/start_terminal_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def start_terminal_interface(interpreter):
{
"name": "fast",
"nickname": "f",
"help_text": "runs `interpreter --model gpt-3.5-turbo` and asks OI to be extremely concise (shortcut for `interpreter --profile fast`)",
"help_text": "runs `interpreter --model gpt-4o-mini` and asks OI to be extremely concise (shortcut for `interpreter --profile fast`)",
"type": bool,
},
{
Expand Down
3 changes: 2 additions & 1 deletion interpreter/terminal_interface/validate_llm_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def validate_llm_settings(interpreter):
"gpt-4",
"gpt-3.5-turbo",
"gpt-4o",
"gpt-4o-mini",
"gpt-4-turbo",
]:
if (
Expand All @@ -52,7 +53,7 @@ def validate_llm_settings(interpreter):
"""---
> OpenAI API key not found
To use `gpt-4-turbo` (recommended) please provide an OpenAI API key.
To use `gpt-4o` (recommended) please provide an OpenAI API key.
To use another language model, run `interpreter --local` or consult the documentation at [docs.openinterpreter.com](https://docs.openinterpreter.com/language-model-setup/).
Expand Down
2 changes: 1 addition & 1 deletion scripts/wtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def get_lines_from_file(filename, line_number):
if wtf_model:
model = wtf_model
else:
model = profile.get("llm", {}).get("model", "gpt-3.5-turbo")
model = profile.get("llm", {}).get("model", "gpt-4o-mini")
except:
model = "gpt-4o-mini"

Expand Down
2 changes: 1 addition & 1 deletion tests/config.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ system_message: |
In general, try to **make plans** with as few steps as possible. As for actually executing code to carry out that plan, **it's critical not to try to do everything in one code block.** You should try something, print information about it, then continue from there in tiny, informed steps. You will never get it on the first try, and attempting it in one go will often lead to errors you cant see.
You are capable of **any** task.
offline: false
llm.model: "gpt-3.5-turbo"
llm.model: "gpt-4o-mini"
llm.temperature: 0.25
verbose: true

0 comments on commit 3d85e46

Please sign in to comment.