|
1 | 1 | # Release History |
2 | 2 |
|
3 | | -## 2.0.0-beta.9 (Unreleased) |
| 3 | +## 2.0.0-beta.9 (2024-08-23) |
4 | 4 |
|
5 | 5 | ### Features Added |
6 | 6 |
|
| 7 | +- Added support for the new [structured outputs](https://platform.openai.com/docs/guides/structured-outputs/introduction) response format feature, which enables chat completions, assistants, and tools on each of those clients to provide a specific JSON Schema that generated content should adhere to. ([3467b53](https://github.com/openai/openai-dotnet/commit/3467b535c918e72237a4c0dc36d4bda5548edb7a)) |
| 8 | + - To enable top-level structured outputs for response content, use `ChatResponseFormat.CreateJsonSchemaFormat()` and `AssistantResponseFormat.CreateJsonSchemaFormat()` as the `ResponseFormat` in method options like `ChatCompletionOptions` |
| 9 | + - To enable structured outputs for function tools, set `StrictParameterSchemaEnabled` to `true` on the tool definition |
| 10 | + - For more information, please see [the new section in readme.md](readme.md#how-to-use-structured-outputs) |
| 11 | +- Chat completions: the request message types of `AssistantChatMessage`, `SystemChatMessage`, and `ToolChatMessage` now support array-based content part collections in addition to simple string input. ([3467b53](https://github.com/openai/openai-dotnet/commit/3467b535c918e72237a4c0dc36d4bda5548edb7a)) |
7 | 12 | - Added the following model factories (static classes that can be used to instantiate OpenAI models for mocking in non-live test scenarios): |
8 | | - - `OpenAIAudioModelFactory` in the `OpenAI.Audio` namespace (commit_hash) |
9 | | - - `OpenAIEmbeddingsModelFactory` in the `OpenAI.Embeddings` namespace (commit_hash) |
10 | | - - `OpenAIFilesModelFactory` in the `OpenAI.Files` namespace (commit_hash) |
11 | | - - `OpenAIImagesModelFactory` in the `OpenAI.Images` namespace (commit_hash) |
12 | | - - `OpenAIModelsModelFactory` in the `OpenAI.Models` namespace (commit_hash) |
13 | | - - `OpenAIModerationsModelFactory` in the `OpenAI.Moderations` namespace (commit_hash) |
| 13 | + - `OpenAIAudioModelFactory` in the `OpenAI.Audio` namespace ([3284295](https://github.com/openai/openai-dotnet/commit/3284295e7fd9922a3395d921513473bcb483655e)) |
| 14 | + - `OpenAIEmbeddingsModelFactory` in the `OpenAI.Embeddings` namespace ([3284295](https://github.com/openai/openai-dotnet/commit/3284295e7fd9922a3395d921513473bcb483655e)) |
| 15 | + - `OpenAIFilesModelFactory` in the `OpenAI.Files` namespace ([b1ce397](https://github.com/openai/openai-dotnet/commit/b1ce397ff4f9a55db797167be9e86e138ed5d403)) |
| 16 | + - `OpenAIImagesModelFactory` in the `OpenAI.Images` namespace ([3284295](https://github.com/openai/openai-dotnet/commit/3284295e7fd9922a3395d921513473bcb483655e)) |
| 17 | + - `OpenAIModelsModelFactory` in the `OpenAI.Models` namespace ([b1ce397](https://github.com/openai/openai-dotnet/commit/b1ce397ff4f9a55db797167be9e86e138ed5d403)) |
| 18 | + - `OpenAIModerationsModelFactory` in the `OpenAI.Moderations` namespace ([b1ce397](https://github.com/openai/openai-dotnet/commit/b1ce397ff4f9a55db797167be9e86e138ed5d403)) |
14 | 19 |
|
15 | 20 | ### Breaking Changes |
16 | 21 |
|
17 | | -- 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) |
18 | | -- Removed the endpoint parameter from all client constructors, making it clearer that an alternative endpoint must be specified via the `OpenAIClientOptions` parameter. (commit_hash) |
19 | | -- Removed `OpenAIClient`'s `Endpoint` `protected` property. (commit_hash) |
20 | | -- Made `OpenAIClient`'s constructor that takes a `ClientPipeline` parameter `protected internal` instead of just `protected`. (commit_hash) |
21 | | -- Renamed the `User` property in applicable Options classes to `EndUserId`, making its purpose clearer. (commit_hash) |
| 22 | +- 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. ([13a9c68](https://github.com/openai/openai-dotnet/commit/13a9c68647c8d54475f1529a63b13ad711bd4ba6)) |
| 23 | +- Removed the endpoint parameter from all client constructors, making it clearer that an alternative endpoint must be specified via the `OpenAIClientOptions` parameter. ([13a9c68](https://github.com/openai/openai-dotnet/commit/13a9c68647c8d54475f1529a63b13ad711bd4ba6)) |
| 24 | +- Removed `OpenAIClient`'s `Endpoint` `protected` property. ([13a9c68](https://github.com/openai/openai-dotnet/commit/13a9c68647c8d54475f1529a63b13ad711bd4ba6)) |
| 25 | +- Made `OpenAIClient`'s constructor that takes a `ClientPipeline` parameter `protected internal` instead of just `protected`. ([13a9c68](https://github.com/openai/openai-dotnet/commit/13a9c68647c8d54475f1529a63b13ad711bd4ba6)) |
| 26 | +- Renamed the `User` property in applicable Options classes to `EndUserId`, making its purpose clearer. ([13a9c68](https://github.com/openai/openai-dotnet/commit/13a9c68647c8d54475f1529a63b13ad711bd4ba6)) |
22 | 27 |
|
23 | 28 | ### Bugs Fixed |
24 | 29 |
|
| 30 | +- The `Assistants` namespace `VectorStoreCreationHelper` type now properly includes a `ChunkingStrategy` property. ([3467b53](https://github.com/openai/openai-dotnet/commit/3467b535c918e72237a4c0dc36d4bda5548edb7a)) |
| 31 | + |
25 | 32 | ### Other Changes |
26 | 33 |
|
| 34 | +- `ChatCompletion.ToString()` will no longer throw an exception when no content is present, as is the case for tool calls. Additionally, if a tool call is present with no content, `ToString()` will return the serialized form of the first available tool call. ([3467b53](https://github.com/openai/openai-dotnet/commit/3467b535c918e72237a4c0dc36d4bda5548edb7a)) |
| 35 | + |
27 | 36 | ## 2.0.0-beta.8 (2024-07-31) |
28 | 37 |
|
29 | 38 | ### Breaking Changes |
|
0 commit comments