Skip to content

Commit

Permalink
feat: Added Gpt4Turbo.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Apr 10, 2024
1 parent 7e1116e commit 0773b39
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<PropertyGroup Label="Nuget">
<Version>2.0.4</Version>
<Version>2.0.5</Version>
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Authors>tryAGI and contributors</Authors>
Expand Down
26 changes: 26 additions & 0 deletions src/libs/OpenAI.Constants/Chat/ChatModels.4.Turbo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,23 @@ public readonly partial record struct ChatModels
/// Training data: Up to Apr 2023 <br/>
/// </summary>
internal const string Gpt4_0125_PreviewId = "gpt-4-0125-preview";

/// <summary>
/// GPT-4 Turbo with Vision model.
/// Vision requests can now use JSON mode and function calling. <br/>
/// Max input tokens: 128,000 tokens <br/>
/// Max output tokens: 4,096 tokens <br/>
/// Training data: Up to Dec 2023 <br/>
/// </summary>
internal const string Gpt4Turbo_2024_04_09Id = "gpt-4-turbo-2024-04-09";

/// <inheritdoc cref="Gpt4_0125_PreviewId"/>
/// <remarks>Alias - Currently points to gpt-4-0125-preview.</remarks>
internal const string Gpt4TurboPreviewId = "gpt-4-turbo-preview";

/// <inheritdoc cref="Gpt4Turbo_2024_04_09Id"/>
/// <remarks>Alias - Currently points to gpt-4-turbo-2024-04-09.</remarks>
internal const string Gpt4TurboId = "gpt-4-turbo";

/// <inheritdoc cref="Gpt4_1106_PreviewId"/>
public static ChatModels Gpt4_1106_Preview { get; } = new(
Expand All @@ -44,9 +57,22 @@ public readonly partial record struct ChatModels
PricePerInputTokenInUsd: 10.0 * UsdPerMillionTokens,
PricePerOutputTokenInUsd: 30.0 * UsdPerMillionTokens);

/// <inheritdoc cref="Gpt4Turbo_2024_04_09Id"/>
public static ChatModels Gpt4Turbo_2024_04_09 { get; } = new(
Id: Gpt4Turbo_2024_04_09Id,
ContextLength: 128_000,
PricePerInputTokenInUsd: 10.0 * UsdPerMillionTokens,
PricePerOutputTokenInUsd: 30.0 * UsdPerMillionTokens);

/// <inheritdoc cref="Gpt4TurboPreviewId"/>
public static ChatModels Gpt4TurboPreview { get; } = Gpt4_0125_Preview with
{
Id = Gpt4TurboPreviewId,
};

/// <inheritdoc cref="Gpt4TurboId"/>
public static ChatModels Gpt4Turbo { get; } = Gpt4Turbo_2024_04_09 with
{
Id = Gpt4TurboId,
};
}

0 comments on commit 0773b39

Please sign in to comment.