From 837d561e8b4e6dad83c63ecf547001f8ce463647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregory=20Li=C3=A9nard?= Date: Wed, 15 May 2024 09:58:23 +0200 Subject: [PATCH] Added latest GPT4 Omni and replaced preview GPT4 models with gpt-4-turbo --- OpenAI_API/EndpointBase.cs | 2 +- OpenAI_API/Images/ImageSize.cs | 2 +- OpenAI_API/Model/Model.cs | 37 +++++++++++++++++++--------------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/OpenAI_API/EndpointBase.cs b/OpenAI_API/EndpointBase.cs index d981c7e..e9f86d6 100644 --- a/OpenAI_API/EndpointBase.cs +++ b/OpenAI_API/EndpointBase.cs @@ -27,7 +27,7 @@ public abstract class EndpointBase /// Constructor of the api endpoint base, to be called from the contructor of any devived classes. Rather than instantiating any endpoint yourself, access it through an instance of . /// /// - internal EndpointBase(OpenAIAPI api) + public EndpointBase(OpenAIAPI api) { this._Api = api; } diff --git a/OpenAI_API/Images/ImageSize.cs b/OpenAI_API/Images/ImageSize.cs index 1b3709c..42c886a 100644 --- a/OpenAI_API/Images/ImageSize.cs +++ b/OpenAI_API/Images/ImageSize.cs @@ -11,7 +11,7 @@ namespace OpenAI_API.Images /// public class ImageSize { - internal ImageSize(string value) { Value = value; } + public ImageSize(string value) { Value = value; } private string Value { get; set; } diff --git a/OpenAI_API/Model/Model.cs b/OpenAI_API/Model/Model.cs index 787740a..bc310f6 100644 --- a/OpenAI_API/Model/Model.cs +++ b/OpenAI_API/Model/Model.cs @@ -140,22 +140,27 @@ public async Task RetrieveModelDetailsAsync(OpenAI_API.OpenAIAPI api) /// public static Model GPT4_32k_Context => new Model("gpt-4-32k") { OwnedBy = "openai" }; - /// - /// Ability to understand images, in addition to all other GPT-4 Turbo capabilities. Returns a maximum of 4,096 output tokens. This is a preview model version and not suited yet for production traffic. - /// - public static Model GPT4_Vision => new Model("gpt-4-vision-preview") { OwnedBy = "openai" }; - - /// - /// The latest GPT-4 model with improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more. Returns a maximum of 4,096 output tokens. This preview model is not yet suited for production traffic. - /// - public static Model GPT4_Turbo => new Model("gpt-4-turbo-preview") { OwnedBy = "openai" }; - #endregion - - #region GPT-3.5 - /// - /// GPT-3.5 Turbo model which regularly updates with the latest model iteration. - /// - public static Model ChatGPTTurbo => new Model("gpt-3.5-turbo") { OwnedBy = "openai" }; + /// + /// GPT-4 Turbo model with vision capabilities. Vision requests can now use JSON mode and function calling. + /// + public static Model GPT4_Vision => new Model("gpt-4-turbo") { OwnedBy = "openai" }; + + /// + /// GPT-4 Turbo model with vision capabilities. Vision requests can now use JSON mode and function calling. + /// + public static Model GPT4_Turbo => new Model("gpt-4-turbo") { OwnedBy = "openai" }; + + /// + /// Our most advanced, multimodal flagship model that’s cheaper and faster than GPT-4 Turbo. + /// + public static Model GPT4_Omni => new Model("gpt-4o") { OwnedBy = "openai" }; + #endregion + + #region GPT-3.5 + /// + /// GPT-3.5 Turbo model which regularly updates with the latest model iteration. + /// + public static Model ChatGPTTurbo => new Model("gpt-3.5-turbo") { OwnedBy = "openai" }; /// /// The latest GPT-3.5 Turbo model with improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more. Returns a maximum of 4,096 output tokens.