Skip to content

Commit

Permalink
feat: Added o1-preview/o1-mini metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Sep 14, 2024
1 parent b405dc4 commit a9d6497
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/libs/OpenAI/Metadata/Metadata.Chat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ public static partial class Metadata
{
return model switch
{
CreateChatCompletionRequestModel.O1Preview or
CreateChatCompletionRequestModel.O1Preview20240912 => new ChatModelMetadata
{
Id = model.ToValueString(),
PricePerInputTokenInUsd = 15.00 * UsdPerMillionTokens,
PricePerOutputTokenInUsd = 60.00 * UsdPerMillionTokens,
ContextLength = 128_000,
OutputLength = 16_000,
},

CreateChatCompletionRequestModel.O1Mini or
CreateChatCompletionRequestModel.O1Mini20240912 => new ChatModelMetadata
{
Id = model.ToValueString(),
PricePerInputTokenInUsd = 3.00 * UsdPerMillionTokens,
PricePerOutputTokenInUsd = 12.00 * UsdPerMillionTokens,
ContextLength = 128_000,
OutputLength = 16_000,
},

CreateChatCompletionRequestModel.Gpt4o or
CreateChatCompletionRequestModel.Gpt4o20240806 => new ChatModelMetadata
{
Expand Down

0 comments on commit a9d6497

Please sign in to comment.