From 7183458a519517452ae1124f653157c2aadff794 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 14 May 2024 11:29:12 -0400 Subject: [PATCH 1/2] gpt-4o Support Adds support for the newly released Gpt_4_o_2024_05_13 model. Released on 4.13.24. As well as the Gpt_4_o model wich points to Gpt_4_o_2024_05_13. --- OpenAI.SDK/ObjectModels/Models.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/OpenAI.SDK/ObjectModels/Models.cs b/OpenAI.SDK/ObjectModels/Models.cs index 9d5e25f1..797268c7 100644 --- a/OpenAI.SDK/ObjectModels/Models.cs +++ b/OpenAI.SDK/ObjectModels/Models.cs @@ -98,7 +98,9 @@ public enum Model Gpt_4_turbo_preview, Gpt_4_turbo, Gpt_4_turbo_2024_04_09, - + Gpt_4_o, + Gpt_4_o_2024_05_13, + WhisperV1, Dall_e_2, @@ -202,6 +204,20 @@ public enum Subject /// 128,000 tokens Up to Dec 2023 /// public static string Gpt_4_turbo_2024_04_09 => "gpt-4-turbo-2024-04-09"; + + /// + /// Our most advanced, multimodal flagship model that’s cheaper and faster than GPT-4 Turbo. + /// Currently points to gpt-4o-2024-05-13. + /// 128,000 tokens Up to Oct 2023 + /// + public static string Gpt_4_o => "gpt-4o"; + + /// + /// Our most advanced, multimodal flagship model that’s cheaper and faster than GPT-4 Turbo. + /// Currently points to gpt-4o-2024-05-13. + /// 128,000 tokens Up to Oct 2023 + /// + public static string Gpt_4_o_2024_05_13 => "gpt-4o-2024-05-13"; public static string Ada => "ada"; @@ -432,6 +448,8 @@ public static string EnumToString(this Model model) Model.Gpt_4_turbo_preview => Gpt_4_turbo_preview, Model.Gpt_4_turbo => Gpt_4_turbo, Model.Gpt_4_turbo_2024_04_09 => Gpt_4_turbo_2024_04_09, + Model.Gpt_4_o => Gpt_4_o, + Model.Gpt_4_o_2024_05_13 => Gpt_4_o_2024_05_13, Model.Tts_1 => Tts_1, Model.Tts_1_hd => Tts_1_hd, Model.Text_moderation_007 => TextModeration007, From f5c85e1366da9a3e3fe4a926cb6205087bbaface Mon Sep 17 00:00:00 2001 From: Tolga Kayhan Date: Fri, 17 May 2024 13:20:20 +0100 Subject: [PATCH 2/2] Updated GPT-4 naming to align with official name. --- OpenAI.SDK/ObjectModels/Models.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenAI.SDK/ObjectModels/Models.cs b/OpenAI.SDK/ObjectModels/Models.cs index 797268c7..9cfb7f1f 100644 --- a/OpenAI.SDK/ObjectModels/Models.cs +++ b/OpenAI.SDK/ObjectModels/Models.cs @@ -98,8 +98,8 @@ public enum Model Gpt_4_turbo_preview, Gpt_4_turbo, Gpt_4_turbo_2024_04_09, - Gpt_4_o, - Gpt_4_o_2024_05_13, + Gpt_4o, + Gpt_4o_2024_05_13, WhisperV1, @@ -210,14 +210,14 @@ public enum Subject /// Currently points to gpt-4o-2024-05-13. /// 128,000 tokens Up to Oct 2023 /// - public static string Gpt_4_o => "gpt-4o"; + public static string Gpt_4o => "gpt-4o"; /// /// Our most advanced, multimodal flagship model that’s cheaper and faster than GPT-4 Turbo. /// Currently points to gpt-4o-2024-05-13. /// 128,000 tokens Up to Oct 2023 /// - public static string Gpt_4_o_2024_05_13 => "gpt-4o-2024-05-13"; + public static string Gpt_4o_2024_05_13 => "gpt-4o-2024-05-13"; public static string Ada => "ada"; @@ -448,8 +448,8 @@ public static string EnumToString(this Model model) Model.Gpt_4_turbo_preview => Gpt_4_turbo_preview, Model.Gpt_4_turbo => Gpt_4_turbo, Model.Gpt_4_turbo_2024_04_09 => Gpt_4_turbo_2024_04_09, - Model.Gpt_4_o => Gpt_4_o, - Model.Gpt_4_o_2024_05_13 => Gpt_4_o_2024_05_13, + Model.Gpt_4o => Gpt_4o, + Model.Gpt_4o_2024_05_13 => Gpt_4o_2024_05_13, Model.Tts_1 => Tts_1, Model.Tts_1_hd => Tts_1_hd, Model.Text_moderation_007 => TextModeration007,