Skip to content

Commit

Permalink
feat: Updated Constants. Released.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Jan 27, 2024
1 parent 5cdf1e2 commit f1aa113
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ for all OpenAI constants(models/prices/context length and other).
```cs
using OpenAI.Constants;

var priceInUsd = ChatPrices.Get(ChatModel.Gpt35Turbo, outputTokens: 4, inputTokens: 4);
string id = EmbeddingModels.Version3Small; // implicit conversion to string
double price = EmbeddingModels.Version3Small.GetPriceInUsd(tokens: 500); // 0.00001
EmbeddingModels.Version3Small.MaxInputTokens // 8191
EmbeddingModels.Version3Small.PricePerTokenInUsd // 0.00000002
```

## Support
Expand Down
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.0-alpha.7</Version>
<Version>2.0.0-alpha.8</Version>
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Authors>tryAGI and contributors</Authors>
Expand Down
22 changes: 8 additions & 14 deletions src/libs/OpenAI.Constants/OpenAI.Constants.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,14 @@
<PropertyGroup Label="Nuget">
<Description>Static classes that provide actual constants(models/context lengts/prices) for the OpenAI API.
Available types in OpenAI.Constants namespace:
- SpeechToTextModel
- SpeechToTextPrices
- TextToSpeechModel
- TextToSpeechPrices
- FineTuningPrices
- ChatModel
- ChatPrices
- EmbeddingModel
- EmbeddingPrices
- ImageModel
- ImagePrices
- ImageQuality
- ImageResolution
- ModerationModel
- ChatModels
- EmbeddingModels
- ImageModels
- ImageQualities
- ImageResolutions
- ModerationModels
- SpeechToTextModels
- TextToSpeechModels
</Description>
<PackageTags>openai;constants;prices;pricing;gpt-3.5;gpt-4;chatgpt;vision;audio;embedding;moderation;image;chat</PackageTags>
</PropertyGroup>
Expand Down

0 comments on commit f1aa113

Please sign in to comment.