From 4f2b2d5e7fe73fee6c1fd36ef9791ad25aed810e Mon Sep 17 00:00:00 2001 From: HavenDV Date: Tue, 14 May 2024 04:02:34 +0400 Subject: [PATCH] feat: Added Omni GPT-4 models. --- src/libs/Directory.Build.props | 2 +- .../Chat/ChatModels.4.Omni.cs | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 src/libs/OpenAI.Constants/Chat/ChatModels.4.Omni.cs diff --git a/src/libs/Directory.Build.props b/src/libs/Directory.Build.props index 0bf1a808..9eca71b5 100755 --- a/src/libs/Directory.Build.props +++ b/src/libs/Directory.Build.props @@ -16,7 +16,7 @@ - 2.0.8 + 2.0.9 true true tryAGI and contributors diff --git a/src/libs/OpenAI.Constants/Chat/ChatModels.4.Omni.cs b/src/libs/OpenAI.Constants/Chat/ChatModels.4.Omni.cs new file mode 100644 index 00000000..c9d57a13 --- /dev/null +++ b/src/libs/OpenAI.Constants/Chat/ChatModels.4.Omni.cs @@ -0,0 +1,33 @@ +// ReSharper disable once CheckNamespace +namespace OpenAI.Constants; + +// ReSharper disable InconsistentNaming + +public readonly partial record struct ChatModels +{ + /// + /// Our most advanced, multimodal flagship model that’s cheaper and faster than GPT-4 Turbo.
+ /// According https://platform.openai.com/docs/models/gpt-4o
+ /// Max input tokens: 128,000 tokens
+ /// Max output tokens: 4,096 tokens
+ /// Training data: Up to Oct 2023
+ ///
+ internal const string Gpt4o_2024_05_13Id = "gpt-4o-2024-05-13"; + + /// + /// Alias - Currently points to gpt-4-1106-vision-preview. + internal const string Gpt4oId = "gpt-4o"; + + /// + public static ChatModels Gpt4o_2024_05_13 { get; } = new( + Gpt4o_2024_05_13Id, + ContextLength: 128_000, + PricePerInputTokenInUsd: 5.0 * UsdPerMillionTokens, + PricePerOutputTokenInUsd: 15.0 * UsdPerMillionTokens); + + /// + public static ChatModels Gpt4o { get; } = Gpt4o_2024_05_13 with + { + Id = Gpt4oId, + }; +} \ No newline at end of file