From da52e2a07262819fa45872c7a08e0a6e2ce56095 Mon Sep 17 00:00:00 2001 From: Tolga Kayhan Date: Mon, 18 Nov 2024 11:51:08 +0000 Subject: [PATCH 1/2] Modified the `Store` property in `ChatCompletionCreateRequest.cs` by removing the default value assignment, which was causing an exception when using Azure. --- OpenAI.Playground/Program.cs | 2 +- .../ObjectModels/RequestModels/ChatCompletionCreateRequest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenAI.Playground/Program.cs b/OpenAI.Playground/Program.cs index 97f0ab81..f9901e96 100644 --- a/OpenAI.Playground/Program.cs +++ b/OpenAI.Playground/Program.cs @@ -51,7 +51,7 @@ // | / \ / \ | \ /) | ( \ /o\ / ) | (\ / | / \ / \ | // |-----------------------------------------------------------------------| -//await ChatCompletionTestHelper.RunSimpleChatCompletionTest(sdk); +await ChatCompletionTestHelper.RunSimpleChatCompletionTest(sdk); //await ChatCompletionTestHelper.RunSimpleCompletionStreamTest(sdk); await (new RealtimeAudioExample(realtimeSdk)).Run(); diff --git a/OpenAI.SDK/ObjectModels/RequestModels/ChatCompletionCreateRequest.cs b/OpenAI.SDK/ObjectModels/RequestModels/ChatCompletionCreateRequest.cs index af60d842..c13f0381 100644 --- a/OpenAI.SDK/ObjectModels/RequestModels/ChatCompletionCreateRequest.cs +++ b/OpenAI.SDK/ObjectModels/RequestModels/ChatCompletionCreateRequest.cs @@ -320,5 +320,5 @@ public IEnumerable Validate() /// more about evals: https://platform.openai.com/docs/guides/evals /// [JsonPropertyName("store")] - public bool? Store { get; set; } = false; + public bool? Store { get; set; } } From 22357f564cc124182ec33c38b5c9846d890f1433 Mon Sep 17 00:00:00 2001 From: Tolga Kayhan Date: Mon, 18 Nov 2024 12:09:16 +0000 Subject: [PATCH 2/2] 8.10.1 --- OpenAI.SDK/Betalgo.Ranul.OpenAI.csproj | 2 +- Readme.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenAI.SDK/Betalgo.Ranul.OpenAI.csproj b/OpenAI.SDK/Betalgo.Ranul.OpenAI.csproj index 3fda3adf..d4693153 100644 --- a/OpenAI.SDK/Betalgo.Ranul.OpenAI.csproj +++ b/OpenAI.SDK/Betalgo.Ranul.OpenAI.csproj @@ -10,7 +10,7 @@ Betalgo-Ranul-OpenAI-icon.png true OpenAI SDK by Betalgo - 8.10.0 + 8.10.1 Tolga Kayhan, Betalgo Betalgo Up Ltd. OpenAI .NET library by Betalgo Ranul diff --git a/Readme.md b/Readme.md index 1d9e8102..581378ed 100644 --- a/Readme.md +++ b/Readme.md @@ -117,6 +117,9 @@ Due to time constraints, not all methods have been thoroughly tested or fully do Needless to say, I cannot accept responsibility for any damage caused by using the library. ## Changelog +### 8.10.1 +- Fixed an issue with the `Store` parameter being included in requests by default, causing errors with Azure OpenAI models. The parameter is now optional and excluded from serialization unless explicitly set. + ### 8.10.0 - Added support for `Microsoft.Extensions.AI` `IChatClient` and `IEmbeddingGenerator` (more information will be coming soon to the Wiki). - Added missing `Temperature` and `TopP` parameters to `AssistantResponse`.