From c46e4657af5279a683663192d7372336f8100ec0 Mon Sep 17 00:00:00 2001 From: Chase Ingersol Date: Thu, 18 Jul 2024 10:44:25 -0700 Subject: [PATCH 1/4] Add support for GPT-4o mini Adds support for the new `gpt-4o-mini` model released today. --- OpenAI.SDK/ObjectModels/Models.cs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/OpenAI.SDK/ObjectModels/Models.cs b/OpenAI.SDK/ObjectModels/Models.cs index b5d6d242..94bbe819 100644 --- a/OpenAI.SDK/ObjectModels/Models.cs +++ b/OpenAI.SDK/ObjectModels/Models.cs @@ -98,6 +98,8 @@ public enum Model Gpt_4_turbo_2024_04_09, Gpt_4o, Gpt_4o_2024_05_13, + Gpt_4o_mini, + Gpt_4o_mini_2024_07_18, WhisperV1, @@ -219,6 +221,22 @@ public enum Subject /// 128,000 tokens Up to Oct 2023 /// public static string Gpt_4o_2024_05_13 => "gpt-4o-2024-05-13"; + + /// + /// Our affordable and intelligent small model for fast, lightweight tasks. + /// GPT-4o mini is cheaper and more capable than GPT-3.5 Turbo. + /// Currently points to gpt-4o-mini-2024-07-18. + /// 128,000 tokens Up to Oct 2023 + /// + public static string Gpt_4o_mini => "gpt-4o-mini"; + + /// + /// Our affordable and intelligent small model for fast, lightweight tasks. + /// GPT-4o mini is cheaper and more capable than GPT-3.5 Turbo. + /// Currently points to gpt-4o-mini-2024-07-18. + /// 128,000 tokens Up to Oct 2023 + /// + public static string Gpt_4o_mini_2024_07_18 => "gpt-4o-mini-2024-07-18"; public static string Ada => "ada"; @@ -457,6 +475,8 @@ public static string EnumToString(this Model model) Model.Gpt_4_turbo_2024_04_09 => Gpt_4_turbo_2024_04_09, Model.Gpt_4o => Gpt_4o, Model.Gpt_4o_2024_05_13 => Gpt_4o_2024_05_13, + Model.Gpt_4o_mini => Gpt_4o_mini, + Model.Gpt_4o_mini_2024_07_18 => Gpt_4o_mini_2024_07_18, Model.Tts_1 => Tts_1, Model.Tts_1_hd => Tts_1_hd, Model.Text_moderation_007 => TextModeration007, @@ -511,4 +531,4 @@ public static string EnumToString(this Subject subject, string? baseModel) _ => throw new ArgumentOutOfRangeException(nameof(subject), subject, null) }, baseModel); } -} \ No newline at end of file +} From eca8cd62d4c887f96e8407809def0836ffe907fb Mon Sep 17 00:00:00 2001 From: Chase Ingersol Date: Thu, 18 Jul 2024 10:49:55 -0700 Subject: [PATCH 2/4] Fix whitespace --- OpenAI.SDK/ObjectModels/Models.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenAI.SDK/ObjectModels/Models.cs b/OpenAI.SDK/ObjectModels/Models.cs index 94bbe819..c0e06254 100644 --- a/OpenAI.SDK/ObjectModels/Models.cs +++ b/OpenAI.SDK/ObjectModels/Models.cs @@ -221,12 +221,12 @@ public enum Subject /// 128,000 tokens Up to Oct 2023 /// public static string Gpt_4o_2024_05_13 => "gpt-4o-2024-05-13"; - + /// /// Our affordable and intelligent small model for fast, lightweight tasks. /// GPT-4o mini is cheaper and more capable than GPT-3.5 Turbo. /// Currently points to gpt-4o-mini-2024-07-18. - /// 128,000 tokens Up to Oct 2023 + /// 128,000 tokens Up to Oct 2023 /// public static string Gpt_4o_mini => "gpt-4o-mini"; @@ -234,7 +234,7 @@ public enum Subject /// Our affordable and intelligent small model for fast, lightweight tasks. /// GPT-4o mini is cheaper and more capable than GPT-3.5 Turbo. /// Currently points to gpt-4o-mini-2024-07-18. - /// 128,000 tokens Up to Oct 2023 + /// 128,000 tokens Up to Oct 2023 /// public static string Gpt_4o_mini_2024_07_18 => "gpt-4o-mini-2024-07-18"; @@ -531,4 +531,4 @@ public static string EnumToString(this Subject subject, string? baseModel) _ => throw new ArgumentOutOfRangeException(nameof(subject), subject, null) }, baseModel); } -} +} \ No newline at end of file From 5eb1a1ecc17156dc86b1fa6d03a26577a50e61c5 Mon Sep 17 00:00:00 2001 From: Tolga Kayhan Date: Thu, 18 Jul 2024 19:28:45 +0100 Subject: [PATCH 3/4] Readme Update --- Readme.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 8b254c51..74233715 100644 --- a/Readme.md +++ b/Readme.md @@ -2,7 +2,7 @@ # .NET SDK for OpenAI ⭐ We appreciate your star, it helps! -[![Discord Shield](https://discord.com/api/guilds/1250841506785529916/widget.png?style=shield)](https://discord.gg/rE9uVp52) *(If the invite link doesn't work, ping me in discussions.)* +[![Discord Shield](https://discord.com/api/guilds/1250841506785529916/widget.png?style=shield)](https://discord.gg/R2XcBC8E) *(If the invite link doesn't work, ping me in discussions.)* We have a very new Discord channel. Please come and help us build the .NET AI community. ## Overview @@ -116,6 +116,9 @@ Due to time constraints, not all methods have been thoroughly tested or fully do Needless to say, I cannot accept responsibility for any damage caused by using the library. ## Changelog + +### 8.6.1 +- Updated Models with new GPT-4o mini model. ### 8.6.0 - Fixed Azure Assistant URLs. - Updated library logo. From 9c8d97fc76f699ba793ff43cd89556e7cc414e16 Mon Sep 17 00:00:00 2001 From: Tolga Kayhan Date: Thu, 18 Jul 2024 19:29:42 +0100 Subject: [PATCH 4/4] Version Update for 8.6.1 --- OpenAI.SDK/OpenAI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenAI.SDK/OpenAI.csproj b/OpenAI.SDK/OpenAI.csproj index 81edca44..85cc1727 100644 --- a/OpenAI.SDK/OpenAI.csproj +++ b/OpenAI.SDK/OpenAI.csproj @@ -10,7 +10,7 @@ Betalgo-Ranul-OpenAI-icon.png true OpenAI SDK by Betalgo - 8.6.0 + 8.6.1 Tolga Kayhan, Betalgo Betalgo Up Ltd. OpenAI ChatGPT, Whisper, GPT-4 and DALL·E dotnet SDK