Skip to content

Commit a9d6497

Browse files
committed
feat: Added o1-preview/o1-mini metadata.
1 parent b405dc4 commit a9d6497

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/libs/OpenAI/Metadata/Metadata.Chat.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,26 @@ public static partial class Metadata
1313
{
1414
return model switch
1515
{
16+
CreateChatCompletionRequestModel.O1Preview or
17+
CreateChatCompletionRequestModel.O1Preview20240912 => new ChatModelMetadata
18+
{
19+
Id = model.ToValueString(),
20+
PricePerInputTokenInUsd = 15.00 * UsdPerMillionTokens,
21+
PricePerOutputTokenInUsd = 60.00 * UsdPerMillionTokens,
22+
ContextLength = 128_000,
23+
OutputLength = 16_000,
24+
},
25+
26+
CreateChatCompletionRequestModel.O1Mini or
27+
CreateChatCompletionRequestModel.O1Mini20240912 => new ChatModelMetadata
28+
{
29+
Id = model.ToValueString(),
30+
PricePerInputTokenInUsd = 3.00 * UsdPerMillionTokens,
31+
PricePerOutputTokenInUsd = 12.00 * UsdPerMillionTokens,
32+
ContextLength = 128_000,
33+
OutputLength = 16_000,
34+
},
35+
1636
CreateChatCompletionRequestModel.Gpt4o or
1737
CreateChatCompletionRequestModel.Gpt4o20240806 => new ChatModelMetadata
1838
{

0 commit comments

Comments
 (0)