Skip to content

Commit 2ab1a94

Browse files
authored
Prepare 2.0.0-beta.12 release (Part 1) (#216)
### Features Added - The library now includes support for the new [OpenAI o1](https://openai.com/o1/) model family. - `ChatCompletionOptions` will automatically apply its `MaxOutputTokenCount` value (renamed from `MaxTokens`) to the new `max_completion_tokens` request body property - `Usage` includes a new `OutputTokenDetails` property with a `ReasoningTokenCount` value that will reflect `o1` model use of this new subcategory of output tokens. - Note that `OutputTokenCount` (`completion_tokens`) is the *sum* of displayed tokens generated by the model *and* (when applicable) these new reasoning tokens - Assistants file search now includes support for `RankingOptions` - Use of the `include[]` query string parameter and retrieval of run step detail result content is currently only available via protocol methods - Added support for the Uploads API in `FileClient`. This `Experimental` feature allows uploading large files in multiple parts. - The feature is supported by the `CreateUpload`, `AddUploadPart`, `CompleteUpload`, and `CancelUpload` protocol methods. ### Breaking Changes - Renamed `ChatMessageContentPart`'s `CreateTextMessageContentPart` factory method to `CreateTextPart`. - Renamed `ChatMessageContentPart`'s `CreateImageMessageContentPart` factory method to `CreateImagePart`. - Renamed `ChatMessageContentPart`'s `CreateRefusalMessageContentPart` factory method to `CreateRefusalPart`. - Renamed `ImageChatMessageContentPartDetail` to `ChatImageDetailLevel`. - Removed `ChatMessageContentPart`'s `ToString` overload. - Renamed the `MaxTokens` property in `ChatCompletionOptions` to `MaxOutputTokenCount` - Renamed properties in `ChatTokenUsage`: - `InputTokens` is renamed to `InputTokenCount` - `OutputTokens` is renamed to `OutputTokenCount` - `TotalTokens` is renamed to `TotalTokenCount` - Removed the common `ListOrder` enum from the top-level `OpenAI` namespace in favor of individual enums in their corresponding sub-namespace. - Renamed the `PageSize` property to `PageSizeLimit`. - Updated deletion methods to return a result object instead of a `bool`. Affected methods: - `DeleteAssitant`, `DeleteMessage`, and `DeleteThread` in `AssistantClient`. - `DeleteVectorStore` and `RemoveFileFromStore` in `VectorStoreClient`. - `DeleteModel` in `ModelClient`. - `DeleteFile` in `FileClient`. - Removed setters from collection properties. - Renamed `ChatTokenLogProbabilityInfo` to `ChatTokenLogProbabilityDetails`. - Renamed `ChatTokenTopLogProbabilityInfo` to `ChatTokenTopLogProbabilityDetails`. - Renamed the `Utf8ByteValues` properties of `ChatTokenLogProbabilityDetails` and `ChatTokenTopLogProbabilityDetails` to `Utf8Bytes` and changed their type from `IReadOnlyList<int>` to `ReadOnlyMemory<byte>?`. - Renamed the `Start` and `End` properties of `TranscribedSegment` and `TranscribedWord` to `StartTime` and `EndTime`. - Changed the type of `TranscribedSegment`'s `AverageLogProbability` and `NoSpeechProbability` properties from `double` to `float`. - Changed the type of `TranscribedSegment`'s `SeekOffset` property from `long` to `int`. - Changed the type of `TranscribedSegment`'s `TokenIds` property from `IReadOnlyList<long>` to `IReadOnlyList<int>`. - Updated the `Embedding.Vector` property to the `Embedding.ToFloats()` method. - Removed the optional parameter from the constructors of `VectorStoreCreationHelper`, `AssistantChatMessage`, and `ChatFunction`. - Removed the optional `purpose` parameter from `FileClient.GetFilesAsync` and `FileClient.GetFiles` methods, and added overloads where `purpose` is required. - Renamed `ModerationClient`'s `ClassifyTextInput` methods to `ClassifyText`. - Removed duplicated `Created` property from `GeneratedImageCollection`. ### Bugs Fixed - Addressed an issue that caused multi-page queries of fine-tuning jobs, checkpoints, and events to fail. - `ChatCompletionOptions` can now be serialized via `ModelReaderWriter.Write()` prior to calling `CompleteChat` using the options ### Other Changes - Added support for `CancellationToken` to `ModelClient` methods. - Applied the `Obsolete` attribute where appropriate to align with the existing deprecations in the REST API.
1 parent dce79fc commit 2ab1a94

File tree

393 files changed

+16877
-7106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

393 files changed

+16877
-7106
lines changed

.github/workflows/live-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Run live tests
2828
run: dotnet test ./tests/OpenAI.Tests.csproj
2929
--configuration Release
30-
--filter="TestCategory!=Smoke&TestCategory!=Images&TestCategory!=Moderations&TestCategory!=Manual"
30+
--filter="TestCategory!=Smoke&TestCategory!=Images&TestCategory!=Uploads&TestCategory!=Moderations&TestCategory!=Manual"
3131
--logger "trx;LogFilePrefix=live"
3232
--results-directory ${{github.workspace}}/artifacts/test-results
3333
${{ env.version_suffix_args}}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Run Live Tests
5050
run: dotnet test ./tests/OpenAI.Tests.csproj
5151
--configuration Release
52-
--filter="TestCategory!=Smoke&TestCategory!=Images&TestCategory!=Moderations&TestCategory!=Manual"
52+
--filter="TestCategory!=Smoke&TestCategory!=Images&TestCategory!=Uploads&TestCategory!=Moderations&TestCategory!=Manual"
5353
--logger "trx;LogFilePrefix=live"
5454
--results-directory ${{ github.workspace }}/artifacts/test-results
5555
${{ env.version_suffix_args }}

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,61 @@
11
# Release History
22

3+
## 2.0.0-beta.12 (Unreleased)
4+
5+
### Features Added
6+
7+
- The library now includes support for the new [OpenAI o1](https://openai.com/o1/) model family.
8+
- `ChatCompletionOptions` will automatically apply its `MaxOutputTokenCount` value (renamed from `MaxTokens`) to the new `max_completion_tokens` request body property
9+
- `Usage` includes a new `OutputTokenDetails` property with a `ReasoningTokenCount` value that will reflect `o1` model use of this new subcategory of output tokens.
10+
- Note that `OutputTokenCount` (`completion_tokens`) is the *sum* of displayed tokens generated by the model *and* (when applicable) these new reasoning tokens
11+
- Assistants file search now includes support for `RankingOptions`
12+
- Use of the `include[]` query string parameter and retrieval of run step detail result content is currently only available via protocol methods
13+
- Added support for the Uploads API in `FileClient`. This `Experimental` feature allows uploading large files in multiple parts.
14+
- The feature is supported by the `CreateUpload`, `AddUploadPart`, `CompleteUpload`, and `CancelUpload` protocol methods.
15+
16+
### Breaking Changes
17+
18+
- Renamed `ChatMessageContentPart`'s `CreateTextMessageContentPart` factory method to `CreateTextPart`. (commit_hash)
19+
- Renamed `ChatMessageContentPart`'s `CreateImageMessageContentPart` factory method to `CreateImagePart`. (commit_hash)
20+
- Renamed `ChatMessageContentPart`'s `CreateRefusalMessageContentPart` factory method to `CreateRefusalPart`. (commit_hash)
21+
- Renamed `ImageChatMessageContentPartDetail` to `ChatImageDetailLevel`.
22+
- Removed `ChatMessageContentPart`'s `ToString` overload. (commit_hash)
23+
- Renamed the `MaxTokens` property in `ChatCompletionOptions` to `MaxOutputTokenCount`
24+
- Renamed properties in `ChatTokenUsage`:
25+
- `InputTokens` is renamed to `InputTokenCount`
26+
- `OutputTokens` is renamed to `OutputTokenCount`
27+
- `TotalTokens` is renamed to `TotalTokenCount`
28+
- Removed the common `ListOrder` enum from the top-level `OpenAI` namespace in favor of individual enums in their corresponding sub-namespace. (commit_hash)
29+
- Renamed the `PageSize` property to `PageSizeLimit`. (commit_hash)
30+
- Updated deletion methods to return a result object instead of a `bool`. Affected methods:
31+
- `DeleteAssitant`, `DeleteMessage`, and `DeleteThread` in `AssistantClient`.
32+
- `DeleteVectorStore` and `RemoveFileFromStore` in `VectorStoreClient`.
33+
- `DeleteModel` in `ModelClient`.
34+
- `DeleteFile` in `FileClient`.
35+
- Removed setters from collection properties. (commit_hash)
36+
- Renamed `ChatTokenLogProbabilityInfo` to `ChatTokenLogProbabilityDetails`. (commit_hash)
37+
- Renamed `ChatTokenTopLogProbabilityInfo` to `ChatTokenTopLogProbabilityDetails`. (commit_hash)
38+
- Renamed the `Utf8ByteValues` properties of `ChatTokenLogProbabilityDetails` and `ChatTokenTopLogProbabilityDetails` to `Utf8Bytes` and changed their type from `IReadOnlyList<int>` to `ReadOnlyMemory<byte>?`. (commit_hash)
39+
- Renamed the `Start` and `End` properties of `TranscribedSegment` and `TranscribedWord` to `StartTime` and `EndTime`. (commit_hash)
40+
- Changed the type of `TranscribedSegment`'s `AverageLogProbability` and `NoSpeechProbability` properties from `double` to `float`. (commit_hash)
41+
- Changed the type of `TranscribedSegment`'s `SeekOffset` property from `long` to `int`. (commit_hash)
42+
- Changed the type of `TranscribedSegment`'s `TokenIds` property from `IReadOnlyList<long>` to `IReadOnlyList<int>`. (commit_hash)
43+
- Updated the `Embedding.Vector` property to the `Embedding.ToFloats()` method. (commit_hash)
44+
- Removed the optional parameter from the constructors of `VectorStoreCreationHelper`, `AssistantChatMessage`, and `ChatFunction`. (commit_hash)
45+
- Removed the optional `purpose` parameter from `FileClient.GetFilesAsync` and `FileClient.GetFiles` methods, and added overloads where `purpose` is required. (commit_hash)
46+
- Renamed `ModerationClient`'s `ClassifyTextInput` methods to `ClassifyText`. (commit_hash)
47+
- Removed duplicated `Created` property from `GeneratedImageCollection`. (commit_hash)
48+
49+
### Bugs Fixed
50+
51+
- Addressed an issue that caused multi-page queries of fine-tuning jobs, checkpoints, and events to fail. (commit_hash)
52+
- `ChatCompletionOptions` can now be serialized via `ModelReaderWriter.Write()` prior to calling `CompleteChat` using the options
53+
54+
### Other Changes
55+
56+
- Added support for `CancellationToken` to `ModelClient` methods. (commit_hash)
57+
- Applied the `Obsolete` attribute where appropriate to align with the existing deprecations in the REST API. (commit_hash)
58+
359
## 2.0.0-beta.11 (2024-09-03)
460

561
### Features Added

OpenAI.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAI", "src\OpenAI.csproj
66
EndProject
77
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAI.Examples", "examples\OpenAI.Examples.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}"
88
EndProject
9-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAI.Tests", "tests\OpenAI.Tests.csproj", "{6F156401-2544-41D7-B204-3148C51C1D09}"
9+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAI.Tests", "tests\OpenAI.Tests.csproj", "{6F156401-2544-41D7-B204-3148C51C1D09}"
1010
EndProject
1111
Global
1212
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -33,4 +33,4 @@ Global
3333
GlobalSection(ExtensibilityGlobals) = postSolution
3434
SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
3535
EndGlobalSection
36-
EndGlobal
36+
EndGlobal

0 commit comments

Comments
 (0)