From 9a3236db61d93cb6d4a5148a8aa8651d734e51a2 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 13 May 2024 13:37:23 -0700 Subject: [PATCH] gpt-4-turbo model ID, closes #493 --- docs/aliases.md | 28 ++++++++++++++-------------- docs/changelog.md | 1 + docs/openai-models.md | 3 ++- docs/usage.md | 12 +++++++++++- llm/default_plugins/openai_models.py | 5 +++-- 5 files changed, 31 insertions(+), 18 deletions(-) diff --git a/docs/aliases.md b/docs/aliases.md index 85d52e50..4ed6499a 100644 --- a/docs/aliases.md +++ b/docs/aliases.md @@ -19,20 +19,20 @@ result = CliRunner().invoke(cli, ["aliases", "list"]) cog.out("```\n{}```".format(result.output)) ]]] --> ``` -3.5 : gpt-3.5-turbo -chatgpt : gpt-3.5-turbo -chatgpt-16k : gpt-3.5-turbo-16k -3.5-16k : gpt-3.5-turbo-16k -4 : gpt-4 -gpt4 : gpt-4 -4-32k : gpt-4-32k -gpt-4-turbo : gpt-4-turbo-preview -4-turbo : gpt-4-turbo-preview -4t : gpt-4-turbo-preview -4o : gpt-4o -3.5-instruct : gpt-3.5-turbo-instruct -chatgpt-instruct : gpt-3.5-turbo-instruct -ada : ada-002 (embedding) +3.5 : gpt-3.5-turbo +chatgpt : gpt-3.5-turbo +chatgpt-16k : gpt-3.5-turbo-16k +3.5-16k : gpt-3.5-turbo-16k +4 : gpt-4 +gpt4 : gpt-4 +4-32k : gpt-4-32k +gpt-4-turbo-preview : gpt-4-turbo +4-turbo : gpt-4-turbo +4t : gpt-4-turbo +4o : gpt-4o +3.5-instruct : gpt-3.5-turbo-instruct +chatgpt-instruct : gpt-3.5-turbo-instruct +ada : ada-002 (embedding) ``` diff --git a/docs/changelog.md b/docs/changelog.md index 9ca3afc3..b92847df 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,7 @@ ## 0.14 (2024-05-13) - Support for OpenAI's [new GPT-4o](https://openai.com/index/hello-gpt-4o/) model: `llm -m gpt-4o 'say hi in Spanish'` [#490](https://github.com/simonw/llm/issues/490) +- The `gpt-4-turbo` alias is now a model ID, which indicates the latest version of OpenAI's GPT-4 Turbo text and image model. Your existing `logs.db` database may contain records under the previous model ID of `gpt-4-turbo-preview`. [#493](https://github.com/simonw/llm/issues/493) - New `llm logs -r/--response` option for outputting just the last captured response, without wrapping it in Markdown and accompanying it with the prompt. [#431](https://github.com/simonw/llm/issues/431) - Nine new {ref}`plugins ` since version 0.13: - **[llm-claude-3](https://github.com/simonw/llm-claude-3)** supporting Anthropic's [Claude 3 family](https://www.anthropic.com/news/claude-3-family) of models. diff --git a/docs/openai-models.md b/docs/openai-models.md index 038d139a..a022236a 100644 --- a/docs/openai-models.md +++ b/docs/openai-models.md @@ -37,7 +37,8 @@ OpenAI Chat: gpt-4 (aliases: 4, gpt4) OpenAI Chat: gpt-4-32k (aliases: 4-32k) OpenAI Chat: gpt-4-1106-preview OpenAI Chat: gpt-4-0125-preview -OpenAI Chat: gpt-4-turbo-preview (aliases: gpt-4-turbo, 4-turbo, 4t) +OpenAI Chat: gpt-4-turbo-2024-04-09 +OpenAI Chat: gpt-4-turbo (aliases: gpt-4-turbo-preview, 4-turbo, 4t) OpenAI Chat: gpt-4o (aliases: 4o) OpenAI Completion: gpt-3.5-turbo-instruct (aliases: 3.5-instruct, chatgpt-instruct)``` diff --git a/docs/usage.md b/docs/usage.md index 568b5259..62aefabe 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -305,7 +305,17 @@ OpenAI Chat: gpt-4-0125-preview logit_bias: dict, str seed: int json_object: boolean -OpenAI Chat: gpt-4-turbo-preview (aliases: gpt-4-turbo, 4-turbo, 4t) +OpenAI Chat: gpt-4-turbo-2024-04-09 + temperature: float + max_tokens: int + top_p: float + frequency_penalty: float + presence_penalty: float + stop: str + logit_bias: dict, str + seed: int + json_object: boolean +OpenAI Chat: gpt-4-turbo (aliases: gpt-4-turbo-preview, 4-turbo, 4t) temperature: float max_tokens: int top_p: float diff --git a/llm/default_plugins/openai_models.py b/llm/default_plugins/openai_models.py index 817919a6..7591f742 100644 --- a/llm/default_plugins/openai_models.py +++ b/llm/default_plugins/openai_models.py @@ -27,10 +27,11 @@ def register_models(register): register(Chat("gpt-3.5-turbo-16k"), aliases=("chatgpt-16k", "3.5-16k")) register(Chat("gpt-4"), aliases=("4", "gpt4")) register(Chat("gpt-4-32k"), aliases=("4-32k",)) - # GPT-4 turbo models + # GPT-4 Turbo models register(Chat("gpt-4-1106-preview")) register(Chat("gpt-4-0125-preview")) - register(Chat("gpt-4-turbo-preview"), aliases=("gpt-4-turbo", "4-turbo", "4t")) + register(Chat("gpt-4-turbo-2024-04-09")) + register(Chat("gpt-4-turbo"), aliases=("gpt-4-turbo-preview", "4-turbo", "4t")) # GPT-4o register(Chat("gpt-4o"), aliases=("4o",)) # The -instruct completion model