diff --git a/src/libs/OpenAI/AssistantClient.CreateRun.AsStream.cs b/src/libs/OpenAI/AssistantClient.CreateRun.AsStream.cs
index fb63046e..8a146ba4 100644
--- a/src/libs/OpenAI/AssistantClient.CreateRun.AsStream.cs
+++ b/src/libs/OpenAI/AssistantClient.CreateRun.AsStream.cs
@@ -221,7 +221,7 @@ public partial class AssistantsClient
threadId: threadId,
include: include,
request: request,
- cancellationToken: cancellationToken))
+ cancellationToken: cancellationToken).ConfigureAwait(false))
{
yield return response;
}
diff --git a/src/libs/OpenAI/ChatClient.CreateChatCompletion.As.cs b/src/libs/OpenAI/ChatClient.CreateChatCompletion.As.cs
index 7481b565..64059bc9 100644
--- a/src/libs/OpenAI/ChatClient.CreateChatCompletion.As.cs
+++ b/src/libs/OpenAI/ChatClient.CreateChatCompletion.As.cs
@@ -7,7 +7,7 @@ namespace OpenAI
{
public partial class ChatClient
{
- ///
+ ///
#if NET6_0_OR_GREATER
[RequiresUnreferencedCode(
"This method uses reflection to generate a JSON schema. Use overload with JsonTypeInfo parameter to avoid this.")]
@@ -87,7 +87,7 @@ public partial class ChatClient
response);
}
- ///
+ ///
public async global::System.Threading.Tasks.Task>
CreateChatCompletionAsAsync(
JsonTypeInfo jsonTypeInfo,
diff --git a/src/libs/OpenAI/ChatClient.CreateChatCompletion.AsStream.cs b/src/libs/OpenAI/ChatClient.CreateChatCompletion.AsStream.cs
index 6f496e80..077c7a7e 100644
--- a/src/libs/OpenAI/ChatClient.CreateChatCompletion.AsStream.cs
+++ b/src/libs/OpenAI/ChatClient.CreateChatCompletion.AsStream.cs
@@ -249,7 +249,7 @@ public partial class ChatClient
User = user,
};
- await foreach (var response in CreateChatCompletionAsStreamAsync(request, cancellationToken))
+ await foreach (var response in CreateChatCompletionAsStreamAsync(request, cancellationToken).ConfigureAwait(false))
{
yield return response;
}
diff --git a/src/libs/OpenAI/Generated/JsonConverters.AnyOfFactory2.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AnyOfFactory2.g.cs
deleted file mode 100644
index 436cf5c8..00000000
--- a/src/libs/OpenAI/Generated/JsonConverters.AnyOfFactory2.g.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-#nullable enable
-
-namespace OpenAI.JsonConverters
-{
- ///
- public sealed class AnyOfJsonConverterFactory2 : global::System.Text.Json.Serialization.JsonConverterFactory
- {
- ///
- public override bool CanConvert(global::System.Type? typeToConvert)
- {
- return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::OpenAI.AnyOf<,>);
- }
-
- ///
- public override global::System.Text.Json.Serialization.JsonConverter CreateConverter(
- global::System.Type typeToConvert,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert));
-
- return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance(
- typeof(AnyOfJsonConverter<,>).MakeGenericType(typeToConvert.GenericTypeArguments))!;
- }
- }
-}
diff --git a/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory1.g.cs b/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory1.g.cs
deleted file mode 100644
index 88b01d0a..00000000
--- a/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory1.g.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-#nullable enable
-
-namespace OpenAI.JsonConverters
-{
- ///
- public sealed class OneOfJsonConverterFactory1 : global::System.Text.Json.Serialization.JsonConverterFactory
- {
- ///
- public override bool CanConvert(global::System.Type? typeToConvert)
- {
- return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::OpenAI.OneOf<>);
- }
-
- ///
- public override global::System.Text.Json.Serialization.JsonConverter CreateConverter(
- global::System.Type typeToConvert,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert));
-
- return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance(
- typeof(OneOfJsonConverter<>).MakeGenericType(typeToConvert.GenericTypeArguments))!;
- }
- }
-}
diff --git a/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory2.g.cs b/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory2.g.cs
deleted file mode 100644
index 7a548d2b..00000000
--- a/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory2.g.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-#nullable enable
-
-namespace OpenAI.JsonConverters
-{
- ///
- public sealed class OneOfJsonConverterFactory2 : global::System.Text.Json.Serialization.JsonConverterFactory
- {
- ///
- public override bool CanConvert(global::System.Type? typeToConvert)
- {
- return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::OpenAI.OneOf<,>);
- }
-
- ///
- public override global::System.Text.Json.Serialization.JsonConverter CreateConverter(
- global::System.Type typeToConvert,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert));
-
- return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance(
- typeof(OneOfJsonConverter<,>).MakeGenericType(typeToConvert.GenericTypeArguments))!;
- }
- }
-}
diff --git a/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory3.g.cs b/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory3.g.cs
deleted file mode 100644
index ffc1332c..00000000
--- a/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory3.g.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-#nullable enable
-
-namespace OpenAI.JsonConverters
-{
- ///
- public sealed class OneOfJsonConverterFactory3 : global::System.Text.Json.Serialization.JsonConverterFactory
- {
- ///
- public override bool CanConvert(global::System.Type? typeToConvert)
- {
- return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::OpenAI.OneOf<,,>);
- }
-
- ///
- public override global::System.Text.Json.Serialization.JsonConverter CreateConverter(
- global::System.Type typeToConvert,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert));
-
- return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance(
- typeof(OneOfJsonConverter<,,>).MakeGenericType(typeToConvert.GenericTypeArguments))!;
- }
- }
-}
diff --git a/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory4.g.cs b/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory4.g.cs
deleted file mode 100644
index 4aa70ce1..00000000
--- a/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory4.g.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-#nullable enable
-
-namespace OpenAI.JsonConverters
-{
- ///
- public sealed class OneOfJsonConverterFactory4 : global::System.Text.Json.Serialization.JsonConverterFactory
- {
- ///
- public override bool CanConvert(global::System.Type? typeToConvert)
- {
- return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::OpenAI.OneOf<,,,>);
- }
-
- ///
- public override global::System.Text.Json.Serialization.JsonConverter CreateConverter(
- global::System.Type typeToConvert,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert));
-
- return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance(
- typeof(OneOfJsonConverter<,,,>).MakeGenericType(typeToConvert.GenericTypeArguments))!;
- }
- }
-}
diff --git a/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory5.g.cs b/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory5.g.cs
deleted file mode 100644
index 80e63c2e..00000000
--- a/src/libs/OpenAI/Generated/JsonConverters.OneOfFactory5.g.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-#nullable enable
-
-namespace OpenAI.JsonConverters
-{
- ///
- public sealed class OneOfJsonConverterFactory5 : global::System.Text.Json.Serialization.JsonConverterFactory
- {
- ///
- public override bool CanConvert(global::System.Type? typeToConvert)
- {
- return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::OpenAI.OneOf<,,,,>);
- }
-
- ///
- public override global::System.Text.Json.Serialization.JsonConverter CreateConverter(
- global::System.Type typeToConvert,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert));
-
- return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance(
- typeof(OneOfJsonConverter<,,,,>).MakeGenericType(typeToConvert.GenericTypeArguments))!;
- }
- }
-}
diff --git a/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs b/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs
index 24a82fce..99088aa2 100644
--- a/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs
+++ b/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs
@@ -745,7 +745,6 @@ namespace OpenAI
typeof(global::OpenAI.JsonConverters.ToolsItem6JsonConverter),
typeof(global::OpenAI.JsonConverters.ContentItemJsonConverter),
typeof(global::OpenAI.JsonConverters.AnnotationsItem2JsonConverter),
- typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2),
typeof(global::OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageContentPartJsonConverter),
typeof(global::OpenAI.JsonConverters.ChatCompletionRequestMessageJsonConverter),
typeof(global::OpenAI.JsonConverters.ChatCompletionRequestSystemMessageContentPartJsonConverter),
@@ -753,25 +752,57 @@ namespace OpenAI
typeof(global::OpenAI.JsonConverters.ChatCompletionRequestToolMessageContentPartJsonConverter),
typeof(global::OpenAI.JsonConverters.ChatCompletionToolChoiceOptionJsonConverter),
typeof(global::OpenAI.JsonConverters.ChunkingStrategyRequestParamJsonConverter),
- typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2),
typeof(global::OpenAI.JsonConverters.ToolsItem2JsonConverter),
typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter),
typeof(global::OpenAI.JsonConverters.ResponseFormatJsonConverter),
- typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory4),
typeof(global::OpenAI.JsonConverters.ContentVariant2ItemJsonConverter),
typeof(global::OpenAI.JsonConverters.ToolsItem3JsonConverter),
- typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory3),
typeof(global::OpenAI.JsonConverters.InputVariant3ItemJsonConverter),
typeof(global::OpenAI.JsonConverters.ToolsItem4JsonConverter),
typeof(global::OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter),
typeof(global::OpenAI.JsonConverters.ToolsItem5JsonConverter),
typeof(global::OpenAI.JsonConverters.CreateVectorStoreRequestChunkingStrategyJsonConverter),
typeof(global::OpenAI.JsonConverters.FineTuneChatCompletionRequestAssistantMessageJsonConverter),
- typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory1),
- typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory5),
typeof(global::OpenAI.JsonConverters.VectorStoreFileObjectChunkingStrategyJsonConverter),
typeof(global::OpenAI.JsonConverters.ToolsItem7JsonConverter),
typeof(global::OpenAI.JsonConverters.RealtimeServerEventJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList>),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::OpenAI.JsonConverters.OneOfJsonConverter),
})]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenAI.JsonSerializerContextTypes))]
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessage.g.cs
index 00371159..8b5bafc9 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessage.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessage.g.cs
@@ -14,7 +14,7 @@ public sealed partial class ChatCompletionRequestAssistantMessage
/// The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
///
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>))]
public global::OpenAI.OneOf>? Content { get; set; }
///
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestSystemMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestSystemMessage.g.cs
index 339d043d..dbe698d1 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestSystemMessage.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestSystemMessage.g.cs
@@ -14,7 +14,7 @@ public sealed partial class ChatCompletionRequestSystemMessage
/// The contents of the system message.
///
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.OneOf> Content { get; set; }
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestToolMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestToolMessage.g.cs
index 797e3e86..dab2ed58 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestToolMessage.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestToolMessage.g.cs
@@ -21,7 +21,7 @@ public sealed partial class ChatCompletionRequestToolMessage
/// The contents of the tool message.
///
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.OneOf> Content { get; set; }
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessage.g.cs
index fbcbd573..630d8039 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessage.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessage.g.cs
@@ -14,7 +14,7 @@ public sealed partial class ChatCompletionRequestUserMessage
/// The contents of the user message.
///
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.OneOf> Content { get; set; }
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequest.g.cs
index 6d8f4643..4eee05a5 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequest.g.cs
@@ -16,7 +16,7 @@ public sealed partial class CreateAssistantRequest
///
/// gpt-4o
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.AnyOf Model { get; set; }
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequest.g.cs
index 6bb96466..3fffdb39 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequest.g.cs
@@ -26,7 +26,7 @@ public sealed partial class CreateChatCompletionRequest
///
/// gpt-4o
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.AnyOf Model { get; set; }
@@ -167,7 +167,7 @@ public sealed partial class CreateChatCompletionRequest
/// Up to 4 sequences where the API will stop generating further tokens.
///
[global::System.Text.Json.Serialization.JsonPropertyName("stop")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>))]
public global::OpenAI.OneOf>? Stop { get; set; }
///
@@ -244,7 +244,7 @@ public sealed partial class CreateChatCompletionRequest
/// `none` is the default when no functions are present. `auto` is the default if functions are present.
///
[global::System.Text.Json.Serialization.JsonPropertyName("function_call")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter))]
public global::OpenAI.OneOf? FunctionCall { get; set; }
///
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateCompletionRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateCompletionRequest.g.cs
index d4aa59b3..01eca70f 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateCompletionRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateCompletionRequest.g.cs
@@ -14,7 +14,7 @@ public sealed partial class CreateCompletionRequest
/// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them.
///
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.AnyOf Model { get; set; }
@@ -24,7 +24,7 @@ public sealed partial class CreateCompletionRequest
/// Default Value: <|endoftext|>
///
[global::System.Text.Json.Serialization.JsonPropertyName("prompt")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory4))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? Prompt { get; set; }
@@ -106,7 +106,7 @@ public sealed partial class CreateCompletionRequest
/// Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
///
[global::System.Text.Json.Serialization.JsonPropertyName("stop")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>))]
public global::OpenAI.OneOf>? Stop { get; set; }
///
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateEmbeddingRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateEmbeddingRequest.g.cs
index fe2abbe4..29cd5e93 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateEmbeddingRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateEmbeddingRequest.g.cs
@@ -16,7 +16,7 @@ public sealed partial class CreateEmbeddingRequest
///
/// The quick brown fox jumped over the lazy dog
[global::System.Text.Json.Serialization.JsonPropertyName("input")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory4))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>> Input { get; set; }
@@ -26,7 +26,7 @@ public sealed partial class CreateEmbeddingRequest
///
/// text-embedding-3-small
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.AnyOf Model { get; set; }
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateFineTuningJobRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateFineTuningJobRequest.g.cs
index 6b174cf3..fae5b695 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateFineTuningJobRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateFineTuningJobRequest.g.cs
@@ -17,7 +17,7 @@ public sealed partial class CreateFineTuningJobRequest
///
/// gpt-4o-mini
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.AnyOf Model { get; set; }
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateFineTuningJobRequestHyperparameters.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateFineTuningJobRequestHyperparameters.g.cs
index 4c3f827e..8e257553 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateFineTuningJobRequestHyperparameters.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateFineTuningJobRequestHyperparameters.g.cs
@@ -16,7 +16,7 @@ public sealed partial class CreateFineTuningJobRequestHyperparameters
/// Default Value: auto
///
[global::System.Text.Json.Serialization.JsonPropertyName("batch_size")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter))]
public global::OpenAI.OneOf? BatchSize { get; set; }
///
@@ -25,7 +25,7 @@ public sealed partial class CreateFineTuningJobRequestHyperparameters
/// Default Value: auto
///
[global::System.Text.Json.Serialization.JsonPropertyName("learning_rate_multiplier")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter))]
public global::OpenAI.OneOf? LearningRateMultiplier { get; set; }
///
@@ -34,7 +34,7 @@ public sealed partial class CreateFineTuningJobRequestHyperparameters
/// Default Value: auto
///
[global::System.Text.Json.Serialization.JsonPropertyName("n_epochs")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter))]
public global::OpenAI.OneOf? NEpochs { get; set; }
///
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageEditRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageEditRequest.g.cs
index 4a5397b2..e3689df4 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageEditRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageEditRequest.g.cs
@@ -52,7 +52,7 @@ public sealed partial class CreateImageEditRequest
///
/// dall-e-2
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
public global::OpenAI.AnyOf? Model { get; set; }
///
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageRequest.g.cs
index d00aa056..682c80b1 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageRequest.g.cs
@@ -26,7 +26,7 @@ public sealed partial class CreateImageRequest
///
/// dall-e-3
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
public global::OpenAI.AnyOf? Model { get; set; }
///
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageVariationRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageVariationRequest.g.cs
index fdf962b0..3bf083b2 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageVariationRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateImageVariationRequest.g.cs
@@ -31,7 +31,7 @@ public sealed partial class CreateImageVariationRequest
///
/// dall-e-2
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
public global::OpenAI.AnyOf? Model { get; set; }
///
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequest.g.cs
index 61f130bf..ba5b2209 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequest.g.cs
@@ -24,7 +24,7 @@ public sealed partial class CreateMessageRequest
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.OneOf> Content { get; set; }
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequest.g.cs
index 24623a8e..789b6929 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequest.g.cs
@@ -15,7 +15,7 @@ public sealed partial class CreateModerationRequest
/// an array of multi-modal input objects similar to other models.
///
[global::System.Text.Json.Serialization.JsonPropertyName("input")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory3))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.OneOf, global::System.Collections.Generic.IList> Input { get; set; }
@@ -28,7 +28,7 @@ public sealed partial class CreateModerationRequest
///
/// omni-moderation-2024-09-26
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
public global::OpenAI.AnyOf? Model { get; set; }
///
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequest.g.cs
index 5c1982af..97b4b549 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequest.g.cs
@@ -23,7 +23,7 @@ public sealed partial class CreateRunRequest
///
/// gpt-4o
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
public global::OpenAI.AnyOf? Model { get; set; }
///
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateSpeechRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateSpeechRequest.g.cs
index 4046ee98..728a3070 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateSpeechRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateSpeechRequest.g.cs
@@ -14,7 +14,7 @@ public sealed partial class CreateSpeechRequest
/// One of the available [TTS models](/docs/models#tts): `tts-1` or `tts-1-hd`
///
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.AnyOf Model { get; set; }
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequest.g.cs
index ecc5dbc8..ac558c91 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequest.g.cs
@@ -29,7 +29,7 @@ public sealed partial class CreateThreadAndRunRequest
///
/// gpt-4o
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
public global::OpenAI.AnyOf? Model { get; set; }
///
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateTranscriptionRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateTranscriptionRequest.g.cs
index 8c279af0..9cc684f8 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateTranscriptionRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateTranscriptionRequest.g.cs
@@ -30,7 +30,7 @@ public sealed partial class CreateTranscriptionRequest
///
/// whisper-1
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.AnyOf Model { get; set; }
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateTranslationRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateTranslationRequest.g.cs
index 3d547da6..c2b315d1 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateTranslationRequest.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateTranslationRequest.g.cs
@@ -30,7 +30,7 @@ public sealed partial class CreateTranslationRequest
///
/// whisper-1
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.AnyOf Model { get; set; }
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.FineTuningJobHyperparameters.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.FineTuningJobHyperparameters.g.cs
index 9ae03821..faf3715f 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.FineTuningJobHyperparameters.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.FineTuningJobHyperparameters.g.cs
@@ -17,7 +17,7 @@ public sealed partial class FineTuningJobHyperparameters
///
/// global::OpenAI.FineTuningJobHyperparametersNEpochs.Auto
[global::System.Text.Json.Serialization.JsonPropertyName("n_epochs")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.OneOf NEpochs { get; set; } = global::OpenAI.FineTuningJobHyperparametersNEpochs.Auto;
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.PredictionContent.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.PredictionContent.g.cs
index 7de965ac..1375aae4 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.PredictionContent.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.PredictionContent.g.cs
@@ -25,7 +25,7 @@ public sealed partial class PredictionContent
/// can be returned much more quickly.
///
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.OneOf> Content { get; set; }
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeResponseCreateResponse.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeResponseCreateResponse.g.cs
index 8f996b69..3e1cf14a 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeResponseCreateResponse.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeResponseCreateResponse.g.cs
@@ -47,7 +47,7 @@ public sealed partial class RealtimeResponseCreateResponse
/// Options are "auto", "none", "required", or specify a function.
///
[global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter))]
public global::OpenAI.OneOf? ToolChoice { get; set; }
///
@@ -61,7 +61,7 @@ public sealed partial class RealtimeResponseCreateResponse
/// Default Value: inf
///
[global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter))]
public global::OpenAI.OneOf? MaxOutputTokens { get; set; }
///
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeSession.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeSession.g.cs
index 357b33c5..bb4fa841 100644
--- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeSession.g.cs
+++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeSession.g.cs
@@ -119,7 +119,7 @@ public sealed partial class RealtimeSession
/// Default Value: inf
///
[global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverter))]
public global::OpenAI.OneOf? MaxOutputTokens { get; set; }
///
diff --git a/src/libs/OpenAI/OpenAI.csproj b/src/libs/OpenAI/OpenAI.csproj
index 67ecba61..27753ede 100644
--- a/src/libs/OpenAI/OpenAI.csproj
+++ b/src/libs/OpenAI/OpenAI.csproj
@@ -24,7 +24,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive