Skip to content

Commit

Permalink
Switch default model to gpt-4o-mini (from gpt-3.5-turbo), refs #536
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jul 18, 2024
1 parent 963a5ba commit a834216
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion llm/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

warnings.simplefilter("ignore", ResourceWarning)

DEFAULT_MODEL = "gpt-3.5-turbo"
DEFAULT_MODEL = "gpt-4o-mini"
DEFAULT_EMBEDDING_MODEL = "ada-002"

DEFAULT_TEMPLATE = "prompt: "
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def mocked_openai_chat(httpx_mock):
method="POST",
url="https://api.openai.com/v1/chat/completions",
json={
"model": "gpt-3.5-turbo",
"model": "gpt-4o-mini",
"usage": {},
"choices": [{"message": {"content": "Bob, Alice, Eve"}}],
},
Expand Down
10 changes: 5 additions & 5 deletions tests/test_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def test_llm_default_prompt(

assert len(rows) == 1
expected = {
"model": "gpt-3.5-turbo",
"model": "gpt-4o-mini",
"prompt": "three names \nfor a pet pelican",
"system": None,
"options_json": "{}",
Expand All @@ -274,7 +274,7 @@ def test_llm_default_prompt(
"messages": [{"role": "user", "content": "three names \nfor a pet pelican"}]
}
assert json.loads(row["response_json"]) == {
"model": "gpt-3.5-turbo",
"model": "gpt-4o-mini",
"choices": [{"message": {"content": "Bob, Alice, Eve"}}],
}

Expand All @@ -288,7 +288,7 @@ def test_llm_default_prompt(
assert (
log_json[0].items()
>= {
"model": "gpt-3.5-turbo",
"model": "gpt-4o-mini",
"prompt": "three names \nfor a pet pelican",
"system": None,
"prompt_json": {
Expand All @@ -299,12 +299,12 @@ def test_llm_default_prompt(
"options_json": {},
"response": "Bob, Alice, Eve",
"response_json": {
"model": "gpt-3.5-turbo",
"model": "gpt-4o-mini",
"choices": [{"message": {"content": "Bob, Alice, Eve"}}],
},
# This doesn't have the \n after three names:
"conversation_name": "three names for a pet pelican",
"conversation_model": "gpt-3.5-turbo",
"conversation_model": "gpt-4o-mini",
}.items()
)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_templates_prompt_save(templates_path, args, expected_prompt, expected_e
(
"'Summarize this: $input'",
[],
"gpt-3.5-turbo",
"gpt-4o-mini",
"Summarize this: Input text",
None,
),
Expand Down Expand Up @@ -150,7 +150,7 @@ def test_templates_prompt_save(templates_path, args, expected_prompt, expected_e
(
"prompt: 'Say $hello'",
["-p", "hello", "Blah"],
"gpt-3.5-turbo",
"gpt-4o-mini",
"Say Blah",
None,
),
Expand Down

0 comments on commit a834216

Please sign in to comment.