Skip to content
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
24 changes: 14 additions & 10 deletions .dotnet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
# Release History

## 2.0.0-beta.10 (Unreleased)
## 2.0.0-beta.11 (Unreleased)

### Features Added

### Breaking Changes

- Removed client constructors that do not explicitly take an API key parameter or an endpoint via an `OpenAIClientOptions` parameter, making it clearer how to appropriately instantiate a client. (commit_hash)
- Removed the endpoint parameter from all client constructors, making it clearer that an alternative endpoint must be specified via the `OpenAIClientOptions` parameter. (commit_hash)
- Removed `OpenAIClient`'s `Endpoint` `protected` property. (commit_hash)
- Made `OpenAIClient`'s constructor that takes a `ClientPipeline` parameter `protected internal` instead of just `protected`. (commit_hash)
- Renamed the `User` property in applicable Options classes to `EndUserId`, making its purpose clearer. (commit_hash)
- Updated fine-tuning pagination methods `GetJobs`, `GetEvents`, and `GetJobCheckpoints` to return `IEnumerable<ClientResult>` instead of `ClientResult`. (commit_hash)
- Updated the batching pagination method `GetBatches` to return `IEnumerable<ClientResult>` instead of `ClientResult`. (commit_hash)
- Renamed `AudioClient`'s `GenerateSpeechFromText` methods to simply `GenerateSpeech`. (commit_hash)
- Changed the type of `OpenAIFileInfo`'s `SizeInBytes` property from `long?` to `int?`. (commit_hash)

### Bugs Fixed

- Fixed a newly introduced bug ([#185](https://github.com/openai/openai-dotnet/pull/185)) where providing `OpenAIClientOptions` to a top-level `OpenAIClient` did not carry over to scenario clients (e.g. `ChatClient`) created via that top-level client
### Other Changes

## 2.0.0-beta.10 (2024-08-26)

### Breaking Changes

- Renamed `AudioClient`'s `GenerateSpeechFromText` methods to simply `GenerateSpeech`. ([d84bf54](https://github.com/openai/openai-dotnet/commit/d84bf54df14ddac4c49f6efd61467b600d34ecd7))
- Changed the type of `OpenAIFileInfo`'s `SizeInBytes` property from `long?` to `int?`. ([d84bf54](https://github.com/openai/openai-dotnet/commit/d84bf54df14ddac4c49f6efd61467b600d34ecd7))

### Bugs Fixed

- Fixed a newly introduced bug ([#185](https://github.com/openai/openai-dotnet/pull/185)) where providing `OpenAIClientOptions` to a top-level `OpenAIClient` did not carry over to scenario clients (e.g. `ChatClient`) created via that top-level client ([d84bf54](https://github.com/openai/openai-dotnet/commit/d84bf54df14ddac4c49f6efd61467b600d34ecd7))

### Other Changes

- Removed the version path parameter "v1" from the default endpoint URL. (commit_hash)
- Removed the version path parameter "v1" from the default endpoint URL. ([d84bf54](https://github.com/openai/openai-dotnet/commit/d84bf54df14ddac4c49f6efd61467b600d34ecd7))

## 2.0.0-beta.9 (2024-08-23)

Expand Down
2 changes: 1 addition & 1 deletion .dotnet/src/OpenAI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PackageTags>OpenAI</PackageTags>

<VersionPrefix>2.0.0</VersionPrefix>
<VersionSuffix>beta.9</VersionSuffix>
<VersionSuffix>beta.10</VersionSuffix>

<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
Expand Down
6 changes: 3 additions & 3 deletions .dotnet/tests/Chat/ChatSmokeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using System.Threading.Tasks;
using static OpenAI.Tests.Telemetry.TestMeterListener;
using static OpenAI.Tests.TestHelpers;
using static System.Runtime.InteropServices.JavaScript.JSType;

namespace OpenAI.Tests.Chat;

Expand Down Expand Up @@ -593,13 +594,12 @@ public void TopLevelClientOptionsPersistence()
OpenAIClientOptions options = new()
{
Transport = mockTransport,
Endpoint = new Uri("https://api.openai.com/expected/test/endpoint"),
Endpoint = new Uri("https://my.custom.com/expected/test/endpoint"),
};
Uri observedEndpoint = null;
options.AddPolicy(new TestPipelinePolicy(message =>
{
observedEndpoint = message?.Request?.Uri;
Console.WriteLine($"foo: {message.Request.Uri.AbsoluteUri}");
}),
PipelinePosition.PerCall);

Expand All @@ -608,6 +608,6 @@ public void TopLevelClientOptionsPersistence()
ClientResult first = firstClient.CompleteChat("Hello, world");

Assert.That(observedEndpoint, Is.Not.Null);
Assert.That(observedEndpoint.AbsoluteUri, Does.Contain("expected/test/endpoint"));
Assert.That(observedEndpoint.AbsoluteUri, Does.Contain("my.custom.com/expected/test/endpoint"));
}
}