Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v 7.1.5 #353

Merged
merged 4 commits into from
Aug 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions OpenAI.Playground/OpenAI.Playground.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<!--<TargetFrameworks>net7.0;net6.0;netstandard2.0</TargetFrameworks>-->
<TargetFrameworks>net7.0;net6.0;netstandard2.0</TargetFrameworks>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -22,9 +21,9 @@
</Content>
</ItemGroup>

<!--<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0'">
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0'">
<PackageReference Include="LaserCatEyes.HttpClientListener" Version="6.0.0" />
</ItemGroup>-->
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="LaserCatEyes.HttpClientListener" Version="6.0.0" />
Expand All @@ -34,7 +33,7 @@
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
</ItemGroup>

<!--<ItemGroup Condition="'$(TargetFramework)' != 'net7.0'">
<ItemGroup Condition="'$(TargetFramework)' != 'net7.0'">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
Expand All @@ -44,7 +43,7 @@
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="7.0.1" />
</ItemGroup>-->
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\OpenAI.SDK\OpenAI.csproj" />
Expand Down
3 changes: 1 addition & 2 deletions OpenAI.SDK/OpenAI.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<!--<TargetFrameworks>net7.0;net6.0;netstandard2.0</TargetFrameworks>-->
<TargetFrameworks>net7.0;net6.0;netstandard2.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>Latest</LangVersion>
Expand Down
4 changes: 2 additions & 2 deletions OpenAI.Utilities/OpenAI.Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageProjectUrl>https://openai.com/</PackageProjectUrl>
<PackageIcon>OpenAI-Betalgo.png</PackageIcon>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>7.0.2</Version>
<Version>7.0.3</Version>
<Authors>Tolga Kayhan, Betalgo</Authors>
<Company>Betalgo Up Ltd.</Company>
<Product>Utility tools for Betalgo.OpenAI</Product>
Expand Down Expand Up @@ -41,7 +41,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Betalgo.OpenAI" Version="7.1.3" />
<PackageReference Include="Betalgo.OpenAI" Version="7.1.4" />
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
<PackageReference Include="Microsoft.Data.Analysis" Version="0.20.1" />
Expand Down
32 changes: 5 additions & 27 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ https://github.com/betalgo/openai/wiki
```
Install-Package Betalgo.OpenAI.Utilities
```
Maintenance of this project is made possible by all the bug reporters, [contributors](https://github.com/betalgo/openai/graphs/contributors) and [sponsors](https://github.com/sponsors/kayhantolga). 💖
Sponsors:
Maintenance of this project is made possible by all the bug reporters, [contributors](https://github.com/betalgo/openai/graphs/contributors) and [sponsors](https://github.com/sponsors/kayhantolga).
💖 Sponsors:
[@betalgo](https://github.com/betalgo),
[Laser Cat Eyes](https://lasercateyes.com/)

Expand Down Expand Up @@ -222,6 +222,9 @@ I will always be using the latest libraries, and future releases will frequently
I am incredibly busy. If I forgot your name, please accept my apologies and let me know so I can add it to the list.

## Changelog
### 7.1.5
- Added error handling for PlatformNotSupportedException in PostAsStreamAsync when using HttpClient.Send, now falls back to SendRequestPreNet6 for compatibility on platforms like MAUI, Mac. Thanks to @Almis90
- We now have a function caller describe method that automatically generates function descriptions. This method is available in the utilities library. Thanks to @vbandi
### 7.1.3
- This release was a bit late and took longer than expected due to a couple of reasons. The future was quite big, and I couldn't cover all possibilities. However, I believe I have covered most of the function definitions (with some details missing). Additionally, I added an option to build it manually. If you don't know what I mean, you don't need to worry. I plan to cover the rest of the function definition in the next release. Until then, you can discover this by playing in the playground or in the source code. This version also support using other libraries to export your function definition.
- We now have support for functions! Big cheers to @rzubek for completing most of this feature.
Expand Down Expand Up @@ -258,28 +261,3 @@ I am incredibly busy. If I forgot your name, please accept my apologies and let
- Fixed Whisper default response type, Thanks to @Swimburger
- Performance improvements and code clean up,again Thanks to @Swimburger 👏
- Code clenaup, Thanks to @WeihanLi
### 6.8.4
- Released update message about nuget Package ID change
### 6.8.3
- **Breaking Changes**:
- ~~I am going to update library namespace from `Betalgo.OpenAI.GPT3` to `OpenAI.GPT3`. This is the first time I am trying to update my nuget packageId. If something broken, please be patient. I will be fixing it soon.~~
Reverted namespace change, maybe next time.
- Small Typo change on model name `Model.GPT4` `to Model.GPT_4`

- `ServiceCollection.AddOpenAIService();` now returns `IHttpClientBuilder` which means it allows you to play with httpclient object. Thanks for all the reporters and @LGinC.
Here is a little sample
```csharp
ServiceCollection.AddOpenAIService()
.ConfigurePrimaryHttpMessageHandler((s => new HttpClientHandler
{
Proxy = new WebProxy("1.1.1.1:1010"),
});
```
### 6.8.1
- **Breaking Changes**: Typo fixed in Content Moderation CategoryScores, changing `Sexualminors` to `SexualMinors`. Thanks to @HowToDoThis.
- Tokenizer changes thanks to @IS4Code.
- Performance improvement
- Introduced a new method `TokenCount` that returns the number of tokens instead of a list.
- **Breaking Changes**: Removed overridden methods that were basically string conversions.
I think these methods were not used much and it is fairly easy to do these conversions outside of the method.
If you disagree, let me know and I can consider adding them back.