diff --git a/src/libs/OpenAI/Generated/JsonConverters.AnnotationsItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AnnotationsItem.g.cs new file mode 100644 index 00000000..bfb25770 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AnnotationsItem.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class AnnotationsItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AnnotationsItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.MessageContentTextAnnotationsFileCitationObject? messageContentTextFileCitationObject = default; + if (discriminator?.Type == global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType.FileCitation) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentTextAnnotationsFileCitationObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.MessageContentTextAnnotationsFilePathObject? messageContentTextFilePathObject = default; + if (discriminator?.Type == global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType.FilePath) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentTextAnnotationsFilePathObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.AnnotationsItem( + discriminator?.Type, + messageContentTextFileCitationObject, + messageContentTextFilePathObject + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AnnotationsItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsMessageContentTextFileCitationObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageContentTextAnnotationsFileCitationObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageContentTextFileCitationObject, typeInfo); + } + else if (value.IsMessageContentTextFilePathObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageContentTextAnnotationsFilePathObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageContentTextFilePathObject, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.AnnotationsItem2.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AnnotationsItem2.g.cs new file mode 100644 index 00000000..ad2e55e7 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AnnotationsItem2.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class AnnotationsItem2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AnnotationsItem2 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? messageDeltaContentTextFileCitationObject = default; + if (discriminator?.Type == global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.FileCitation) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? messageDeltaContentTextFilePathObject = default; + if (discriminator?.Type == global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.FilePath) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.AnnotationsItem2( + discriminator?.Type, + messageDeltaContentTextFileCitationObject, + messageDeltaContentTextFilePathObject + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AnnotationsItem2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsMessageDeltaContentTextFileCitationObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaContentTextFileCitationObject, typeInfo); + } + else if (value.IsMessageDeltaContentTextFilePathObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaContentTextFilePathObject, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantObjectToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantObjectToolDiscriminatorType.g.cs new file mode 100644 index 00000000..b61f6079 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantObjectToolDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantObjectToolDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantObjectToolDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantObjectToolDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantObjectToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantObjectToolDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantObjectToolDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantObjectToolDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantObjectToolDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..7af87d42 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantObjectToolDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantObjectToolDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantObjectToolDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantObjectToolDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantObjectToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantObjectToolDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantObjectToolDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEvent.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEvent.g.cs index a97704cb..cd0006ba 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEvent.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEvent.g.cs @@ -15,125 +15,217 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - var - readerCopy = reader; - global::OpenAI.ThreadStreamEvent? thread = default; - try + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.ErrorEvent? value1 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.Error) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ThreadStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ThreadStreamEvent).Name}"); - thread = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ErrorEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ErrorEvent)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - catch (global::System.Text.Json.JsonException) + global::OpenAI.DoneEvent? value2 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.Done) { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.DoneEvent)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; - global::OpenAI.RunStreamEvent? run = default; - try + global::OpenAI.AssistantStreamEventVariant3? value3 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadCreated) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEvent).Name}"); - run = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant3)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - catch (global::System.Text.Json.JsonException) + global::OpenAI.AssistantStreamEventVariant4? value4 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunCreated) { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant4)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; - global::OpenAI.RunStepStreamEvent? runStep = default; - try + global::OpenAI.AssistantStreamEventVariant5? value5 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunQueued) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEvent).Name}"); - runStep = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant5)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - catch (global::System.Text.Json.JsonException) + global::OpenAI.AssistantStreamEventVariant6? value6 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunInProgress) { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant6)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; - global::OpenAI.MessageStreamEvent? message = default; - try + global::OpenAI.AssistantStreamEventVariant7? value7 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunRequiresAction) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEvent).Name}"); - message = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant7)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - catch (global::System.Text.Json.JsonException) + global::OpenAI.AssistantStreamEventVariant8? value8 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunCompleted) { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant8)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; - global::OpenAI.ErrorEvent? error = default; - try + global::OpenAI.AssistantStreamEventVariant9? value9 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunIncomplete) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ErrorEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ErrorEvent).Name}"); - error = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant9)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - catch (global::System.Text.Json.JsonException) + global::OpenAI.AssistantStreamEventVariant10? value10 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunFailed) { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant10)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; - global::OpenAI.DoneEvent? done = default; - try + global::OpenAI.AssistantStreamEventVariant11? value11 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunCancelling) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.DoneEvent).Name}"); - done = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant11), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant11)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - catch (global::System.Text.Json.JsonException) + global::OpenAI.AssistantStreamEventVariant12? value12 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunCancelled) { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant12)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - var result = new global::OpenAI.AssistantStreamEvent( - thread, - run, - runStep, - message, - error, - done - ); - - if (thread != null) + global::OpenAI.AssistantStreamEventVariant13? value13 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunExpired) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ThreadStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ThreadStreamEvent).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant13), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant13)}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (run != null) + global::OpenAI.AssistantStreamEventVariant14? value14 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunStepCreated) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEvent).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant14), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant14)}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (runStep != null) + global::OpenAI.AssistantStreamEventVariant15? value15 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunStepInProgress) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEvent).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant15), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant15)}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (message != null) + global::OpenAI.AssistantStreamEventVariant16? value16 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunStepDelta) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEvent).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant16)}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (error != null) + global::OpenAI.AssistantStreamEventVariant17? value17 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunStepCompleted) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ErrorEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ErrorEvent).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant17)}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (done != null) + global::OpenAI.AssistantStreamEventVariant18? value18 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunStepFailed) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.DoneEvent).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant18), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant18)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantStreamEventVariant19? value19 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunStepCancelled) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant19), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant19)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantStreamEventVariant20? value20 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadRunStepExpired) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant20), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant20)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantStreamEventVariant21? value21 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadMessageCreated) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant21), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant21)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantStreamEventVariant22? value22 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadMessageInProgress) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant22), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant22)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantStreamEventVariant23? value23 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadMessageDelta) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant23), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant23)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantStreamEventVariant24? value24 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadMessageCompleted) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant24), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant24)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantStreamEventVariant25? value25 = default; + if (discriminator?.Event == global::OpenAI.AssistantStreamEventDiscriminatorEvent.ThreadMessageIncomplete) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant25), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantStreamEventVariant25)}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + var result = new global::OpenAI.AssistantStreamEvent( + discriminator?.Event, + value1, + value2, + value3, + value4, + value5, + value6, + value7, + value8, + value9, + value10, + value11, + value12, + value13, + value14, + value15, + value16, + value17, + value18, + value19, + value20, + value21, + value22, + value23, + value24, + value25 + ); + return result; } @@ -146,41 +238,155 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (value.IsThread) + if (value.IsValue1) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ThreadStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ThreadStreamEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Thread, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ErrorEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ErrorEvent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); } - else if (value.IsRun) + else if (value.IsValue2) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Run, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.DoneEvent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); } - else if (value.IsRunStep) + else if (value.IsValue3) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStep, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant3).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); } - else if (value.IsMessage) + else if (value.IsValue4) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Message, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant4).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); } - else if (value.IsError) + else if (value.IsValue5) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ErrorEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ErrorEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Error, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant5).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5, typeInfo); } - else if (value.IsDone) + else if (value.IsValue6) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.DoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Done, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant6).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value6, typeInfo); + } + else if (value.IsValue7) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant7).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value7, typeInfo); + } + else if (value.IsValue8) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant8).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value8, typeInfo); + } + else if (value.IsValue9) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant9).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value9, typeInfo); + } + else if (value.IsValue10) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant10).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value10, typeInfo); + } + else if (value.IsValue11) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant11), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant11).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value11, typeInfo); + } + else if (value.IsValue12) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant12).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value12, typeInfo); + } + else if (value.IsValue13) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant13), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant13).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value13, typeInfo); + } + else if (value.IsValue14) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant14), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant14).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value14, typeInfo); + } + else if (value.IsValue15) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant15), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant15).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value15, typeInfo); + } + else if (value.IsValue16) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant16).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value16, typeInfo); + } + else if (value.IsValue17) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant17).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value17, typeInfo); + } + else if (value.IsValue18) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant18), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant18).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value18, typeInfo); + } + else if (value.IsValue19) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant19), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant19).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value19, typeInfo); + } + else if (value.IsValue20) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant20), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant20).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value20, typeInfo); + } + else if (value.IsValue21) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant21), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant21).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value21, typeInfo); + } + else if (value.IsValue22) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant22), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant22).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value22, typeInfo); + } + else if (value.IsValue23) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant23), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant23).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value23, typeInfo); + } + else if (value.IsValue24) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant24), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant24).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value24, typeInfo); + } + else if (value.IsValue25) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantStreamEventVariant25), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantStreamEventVariant25).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value25, typeInfo); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventDiscriminatorEvent.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventDiscriminatorEvent.g.cs new file mode 100644 index 00000000..cfc82f1f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventDiscriminatorEvent.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventDiscriminatorEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventDiscriminatorEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventDiscriminatorEventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventDiscriminatorEvent)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventDiscriminatorEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventDiscriminatorEventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventDiscriminatorEventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventDiscriminatorEventNullable.g.cs new file mode 100644 index 00000000..7ea756ce --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventDiscriminatorEventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventDiscriminatorEventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventDiscriminatorEvent? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventDiscriminatorEventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventDiscriminatorEvent)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventDiscriminatorEvent? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventDiscriminatorEventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant10Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant10Event.g.cs new file mode 100644 index 00000000..32037e12 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant10Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant10EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant10Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant10EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant10Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant10Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant10EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant10EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant10EventNullable.g.cs new file mode 100644 index 00000000..a25e2081 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant10EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant10EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant10Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant10EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant10Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant10Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant10EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant11Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant11Event.g.cs new file mode 100644 index 00000000..fae07416 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant11Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant11EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant11Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant11EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant11Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant11Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant11EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant11EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant11EventNullable.g.cs new file mode 100644 index 00000000..b43cb9c5 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant11EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant11EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant11Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant11EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant11Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant11Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant11EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant12Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant12Event.g.cs new file mode 100644 index 00000000..e44e3173 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant12Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant12EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant12Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant12EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant12Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant12Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant12EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant12EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant12EventNullable.g.cs new file mode 100644 index 00000000..541c0581 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant12EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant12EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant12Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant12EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant12Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant12Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant12EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant13Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant13Event.g.cs new file mode 100644 index 00000000..3cfd9d7d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant13Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant13EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant13Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant13EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant13Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant13Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant13EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant13EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant13EventNullable.g.cs new file mode 100644 index 00000000..3959a1a8 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant13EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant13EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant13Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant13EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant13Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant13Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant13EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant14Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant14Event.g.cs new file mode 100644 index 00000000..39eeb7c1 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant14Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant14EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant14Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant14EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant14Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant14Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant14EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant14EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant14EventNullable.g.cs new file mode 100644 index 00000000..f9fdc804 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant14EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant14EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant14Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant14EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant14Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant14Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant14EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant15Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant15Event.g.cs new file mode 100644 index 00000000..894c60fc --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant15Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant15EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant15Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant15EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant15Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant15Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant15EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant15EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant15EventNullable.g.cs new file mode 100644 index 00000000..1f209bc1 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant15EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant15EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant15Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant15EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant15Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant15Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant15EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant16Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant16Event.g.cs new file mode 100644 index 00000000..778a139c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant16Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant16EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant16Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant16EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant16Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant16Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant16EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant16EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant16EventNullable.g.cs new file mode 100644 index 00000000..c788c048 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant16EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant16EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant16Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant16EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant16Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant16Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant16EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant17Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant17Event.g.cs new file mode 100644 index 00000000..5e76ce49 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant17Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant17EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant17Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant17EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant17Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant17Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant17EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant17EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant17EventNullable.g.cs new file mode 100644 index 00000000..3d0da7df --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant17EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant17EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant17Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant17EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant17Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant17Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant17EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant18Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant18Event.g.cs new file mode 100644 index 00000000..4f3a09ee --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant18Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant18EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant18Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant18EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant18Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant18Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant18EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant18EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant18EventNullable.g.cs new file mode 100644 index 00000000..e56f6186 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant18EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant18EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant18Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant18EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant18Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant18Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant18EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant19Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant19Event.g.cs new file mode 100644 index 00000000..8743e2d6 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant19Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant19EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant19Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant19EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant19Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant19Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant19EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant19EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant19EventNullable.g.cs new file mode 100644 index 00000000..0c7fbee2 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant19EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant19EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant19Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant19EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant19Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant19Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant19EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant20Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant20Event.g.cs new file mode 100644 index 00000000..dddffa04 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant20Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant20EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant20Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant20EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant20Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant20Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant20EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant20EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant20EventNullable.g.cs new file mode 100644 index 00000000..584f1a18 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant20EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant20EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant20Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant20EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant20Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant20Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant20EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant21Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant21Event.g.cs new file mode 100644 index 00000000..e91ed5e5 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant21Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant21EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant21Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant21EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant21Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant21Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant21EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant21EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant21EventNullable.g.cs new file mode 100644 index 00000000..8e146ca3 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant21EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant21EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant21Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant21EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant21Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant21Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant21EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant22Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant22Event.g.cs new file mode 100644 index 00000000..0b42e8d3 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant22Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant22EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant22Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant22EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant22Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant22Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant22EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant22EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant22EventNullable.g.cs new file mode 100644 index 00000000..2c38205c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant22EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant22EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant22Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant22EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant22Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant22Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant22EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant23Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant23Event.g.cs new file mode 100644 index 00000000..2ecedda2 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant23Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant23EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant23Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant23EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant23Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant23Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant23EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant23EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant23EventNullable.g.cs new file mode 100644 index 00000000..d7ea7f62 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant23EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant23EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant23Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant23EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant23Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant23Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant23EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant24Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant24Event.g.cs new file mode 100644 index 00000000..f4060ff2 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant24Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant24EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant24Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant24EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant24Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant24Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant24EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant24EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant24EventNullable.g.cs new file mode 100644 index 00000000..a860e3d6 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant24EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant24EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant24Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant24EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant24Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant24Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant24EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant25Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant25Event.g.cs new file mode 100644 index 00000000..cb751701 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant25Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant25EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant25Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant25EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant25Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant25Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant25EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant25EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant25EventNullable.g.cs new file mode 100644 index 00000000..ca8c4db9 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant25EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant25EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant25Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant25EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant25Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant25Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant25EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant3Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant3Event.g.cs similarity index 66% rename from src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant3Event.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant3Event.g.cs index c797caef..ffbdceeb 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant3Event.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant3Event.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class MessageStreamEventVariant3EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class AssistantStreamEventVariant3EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.MessageStreamEventVariant3Event Read( + public override global::OpenAI.AssistantStreamEventVariant3Event Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class MessageStreamEventVariant3EventJsonConverter : global::Syste var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.MessageStreamEventVariant3EventExtensions.ToEnum(stringValue) ?? default; + return global::OpenAI.AssistantStreamEventVariant3EventExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class MessageStreamEventVariant3EventJsonConverter : global::Syste case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.MessageStreamEventVariant3Event)numValue; + return (global::OpenAI.AssistantStreamEventVariant3Event)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class MessageStreamEventVariant3EventJsonConverter : global::Syste /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.MessageStreamEventVariant3Event value, + global::OpenAI.AssistantStreamEventVariant3Event value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::OpenAI.MessageStreamEventVariant3EventExtensions.ToValueString(value)); + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant3EventExtensions.ToValueString(value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant2EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant3EventNullable.g.cs similarity index 68% rename from src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant2EventNullable.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant3EventNullable.g.cs index 8d664ba7..ab3c3220 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant2EventNullable.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant3EventNullable.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class MessageStreamEventVariant2EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class AssistantStreamEventVariant3EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.MessageStreamEventVariant2Event? Read( + public override global::OpenAI.AssistantStreamEventVariant3Event? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class MessageStreamEventVariant2EventNullableJsonConverter : globa var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.MessageStreamEventVariant2EventExtensions.ToEnum(stringValue); + return global::OpenAI.AssistantStreamEventVariant3EventExtensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class MessageStreamEventVariant2EventNullableJsonConverter : globa case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.MessageStreamEventVariant2Event)numValue; + return (global::OpenAI.AssistantStreamEventVariant3Event)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class MessageStreamEventVariant2EventNullableJsonConverter : globa /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.MessageStreamEventVariant2Event? value, + global::OpenAI.AssistantStreamEventVariant3Event? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::OpenAI.MessageStreamEventVariant2EventExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant3EventExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant1Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant4Event.g.cs similarity index 66% rename from src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant1Event.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant4Event.g.cs index 1c5e562e..4f0762af 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant1Event.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant4Event.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class MessageStreamEventVariant1EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class AssistantStreamEventVariant4EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.MessageStreamEventVariant1Event Read( + public override global::OpenAI.AssistantStreamEventVariant4Event Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class MessageStreamEventVariant1EventJsonConverter : global::Syste var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.MessageStreamEventVariant1EventExtensions.ToEnum(stringValue) ?? default; + return global::OpenAI.AssistantStreamEventVariant4EventExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class MessageStreamEventVariant1EventJsonConverter : global::Syste case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.MessageStreamEventVariant1Event)numValue; + return (global::OpenAI.AssistantStreamEventVariant4Event)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class MessageStreamEventVariant1EventJsonConverter : global::Syste /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.MessageStreamEventVariant1Event value, + global::OpenAI.AssistantStreamEventVariant4Event value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::OpenAI.MessageStreamEventVariant1EventExtensions.ToValueString(value)); + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant4EventExtensions.ToValueString(value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant3EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant4EventNullable.g.cs similarity index 68% rename from src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant3EventNullable.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant4EventNullable.g.cs index 1b147431..ef2b2357 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant3EventNullable.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant4EventNullable.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class MessageStreamEventVariant3EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class AssistantStreamEventVariant4EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.MessageStreamEventVariant3Event? Read( + public override global::OpenAI.AssistantStreamEventVariant4Event? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class MessageStreamEventVariant3EventNullableJsonConverter : globa var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.MessageStreamEventVariant3EventExtensions.ToEnum(stringValue); + return global::OpenAI.AssistantStreamEventVariant4EventExtensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class MessageStreamEventVariant3EventNullableJsonConverter : globa case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.MessageStreamEventVariant3Event)numValue; + return (global::OpenAI.AssistantStreamEventVariant4Event)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class MessageStreamEventVariant3EventNullableJsonConverter : globa /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.MessageStreamEventVariant3Event? value, + global::OpenAI.AssistantStreamEventVariant4Event? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::OpenAI.MessageStreamEventVariant3EventExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant4EventExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant4Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant5Event.g.cs similarity index 66% rename from src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant4Event.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant5Event.g.cs index f855c65f..d5cd0b0e 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant4Event.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant5Event.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class MessageStreamEventVariant4EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class AssistantStreamEventVariant5EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.MessageStreamEventVariant4Event Read( + public override global::OpenAI.AssistantStreamEventVariant5Event Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class MessageStreamEventVariant4EventJsonConverter : global::Syste var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.MessageStreamEventVariant4EventExtensions.ToEnum(stringValue) ?? default; + return global::OpenAI.AssistantStreamEventVariant5EventExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class MessageStreamEventVariant4EventJsonConverter : global::Syste case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.MessageStreamEventVariant4Event)numValue; + return (global::OpenAI.AssistantStreamEventVariant5Event)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class MessageStreamEventVariant4EventJsonConverter : global::Syste /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.MessageStreamEventVariant4Event value, + global::OpenAI.AssistantStreamEventVariant5Event value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::OpenAI.MessageStreamEventVariant4EventExtensions.ToValueString(value)); + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant5EventExtensions.ToValueString(value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant1EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant5EventNullable.g.cs similarity index 68% rename from src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant1EventNullable.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant5EventNullable.g.cs index 7b965288..4857fda7 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant1EventNullable.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant5EventNullable.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class MessageStreamEventVariant1EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class AssistantStreamEventVariant5EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.MessageStreamEventVariant1Event? Read( + public override global::OpenAI.AssistantStreamEventVariant5Event? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class MessageStreamEventVariant1EventNullableJsonConverter : globa var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.MessageStreamEventVariant1EventExtensions.ToEnum(stringValue); + return global::OpenAI.AssistantStreamEventVariant5EventExtensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class MessageStreamEventVariant1EventNullableJsonConverter : globa case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.MessageStreamEventVariant1Event)numValue; + return (global::OpenAI.AssistantStreamEventVariant5Event)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class MessageStreamEventVariant1EventNullableJsonConverter : globa /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.MessageStreamEventVariant1Event? value, + global::OpenAI.AssistantStreamEventVariant5Event? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::OpenAI.MessageStreamEventVariant1EventExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant5EventExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant2Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant6Event.g.cs similarity index 66% rename from src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant2Event.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant6Event.g.cs index 8424ced5..ebe9e6c4 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant2Event.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant6Event.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class MessageStreamEventVariant2EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class AssistantStreamEventVariant6EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.MessageStreamEventVariant2Event Read( + public override global::OpenAI.AssistantStreamEventVariant6Event Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class MessageStreamEventVariant2EventJsonConverter : global::Syste var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.MessageStreamEventVariant2EventExtensions.ToEnum(stringValue) ?? default; + return global::OpenAI.AssistantStreamEventVariant6EventExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class MessageStreamEventVariant2EventJsonConverter : global::Syste case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.MessageStreamEventVariant2Event)numValue; + return (global::OpenAI.AssistantStreamEventVariant6Event)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class MessageStreamEventVariant2EventJsonConverter : global::Syste /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.MessageStreamEventVariant2Event value, + global::OpenAI.AssistantStreamEventVariant6Event value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::OpenAI.MessageStreamEventVariant2EventExtensions.ToValueString(value)); + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant6EventExtensions.ToValueString(value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant4EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant6EventNullable.g.cs similarity index 68% rename from src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant4EventNullable.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant6EventNullable.g.cs index 06254bf8..47ac5346 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant4EventNullable.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant6EventNullable.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class MessageStreamEventVariant4EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class AssistantStreamEventVariant6EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.MessageStreamEventVariant4Event? Read( + public override global::OpenAI.AssistantStreamEventVariant6Event? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class MessageStreamEventVariant4EventNullableJsonConverter : globa var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.MessageStreamEventVariant4EventExtensions.ToEnum(stringValue); + return global::OpenAI.AssistantStreamEventVariant6EventExtensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class MessageStreamEventVariant4EventNullableJsonConverter : globa case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.MessageStreamEventVariant4Event)numValue; + return (global::OpenAI.AssistantStreamEventVariant6Event)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class MessageStreamEventVariant4EventNullableJsonConverter : globa /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.MessageStreamEventVariant4Event? value, + global::OpenAI.AssistantStreamEventVariant6Event? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::OpenAI.MessageStreamEventVariant4EventExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant6EventExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant7Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant7Event.g.cs new file mode 100644 index 00000000..dee0642f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant7Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant7EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant7Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant7EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant7Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant7Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant7EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant7EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant7EventNullable.g.cs new file mode 100644 index 00000000..5fb43627 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant7EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant7EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant7Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant7EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant7Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant7Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant7EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant8Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant8Event.g.cs new file mode 100644 index 00000000..60b7549d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant8Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant8EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant8Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant8EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant8Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant8Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant8EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant8EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant8EventNullable.g.cs new file mode 100644 index 00000000..518f427d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant8EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant8EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant8Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant8EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant8Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant8Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant8EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant9Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant9Event.g.cs new file mode 100644 index 00000000..258a9559 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant9Event.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant9EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant9Event Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant9EventExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant9Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant9Event value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant9EventExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant9EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant9EventNullable.g.cs new file mode 100644 index 00000000..763942c7 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.AssistantStreamEventVariant9EventNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class AssistantStreamEventVariant9EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.AssistantStreamEventVariant9Event? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.AssistantStreamEventVariant9EventExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.AssistantStreamEventVariant9Event)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.AssistantStreamEventVariant9Event? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.AssistantStreamEventVariant9EventExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestAssistantMessageContentPart.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestAssistantMessageContentPart.g.cs index cc3d32ee..20fb0bc5 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestAssistantMessageContentPart.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestAssistantMessageContentPart.g.cs @@ -15,49 +15,33 @@ public class ChatCompletionRequestAssistantMessageContentPartJsonConverter : glo options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - var - readerCopy = reader; + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + global::OpenAI.ChatCompletionRequestMessageContentPartText? text = default; - try + if (discriminator?.Type == global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.Text) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); - text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestMessageContentPartText)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.ChatCompletionRequestMessageContentPartRefusal? refusal = default; - try + if (discriminator?.Type == global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.Refusal) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestMessageContentPartRefusal), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestMessageContentPartRefusal).Name}"); - refusal = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestMessageContentPartRefusal)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::OpenAI.ChatCompletionRequestAssistantMessageContentPart( + discriminator?.Type, text, refusal ); - if (text != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (refusal != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestMessageContentPartRefusal), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestMessageContentPartRefusal).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - return result; } diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.g.cs new file mode 100644 index 00000000..50b16a70 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..94c07471 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestMessage.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestMessage.g.cs index 9996f6db..73a97a24 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestMessage.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestMessage.g.cs @@ -15,68 +15,50 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - var - readerCopy = reader; + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestMessageDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestMessageDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + global::OpenAI.ChatCompletionRequestSystemMessage? system = default; - try + if (discriminator?.Role == global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole.System) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestSystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestSystemMessage).Name}"); - system = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestSystemMessage)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.ChatCompletionRequestUserMessage? user = default; - try + if (discriminator?.Role == global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole.User) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestUserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestUserMessage).Name}"); - user = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestUserMessage)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.ChatCompletionRequestAssistantMessage? assistant = default; - try + if (discriminator?.Role == global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole.Assistant) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestAssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestAssistantMessage).Name}"); - assistant = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestAssistantMessage)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.ChatCompletionRequestToolMessage? tool = default; - try + if (discriminator?.Role == global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole.Tool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestToolMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestToolMessage).Name}"); - tool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestToolMessage)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.ChatCompletionRequestFunctionMessage? function = default; - try + if (discriminator?.Role == global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole.Function) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestFunctionMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestFunctionMessage).Name}"); - function = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestFunctionMessage)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::OpenAI.ChatCompletionRequestMessage( + discriminator?.Role, system, user, assistant, @@ -84,37 +66,6 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso function ); - if (system != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestSystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestSystemMessage).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (user != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestUserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestUserMessage).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (assistant != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestAssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestAssistantMessage).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (tool != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestToolMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestToolMessage).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (function != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestFunctionMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestFunctionMessage).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - return result; } diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestMessageDiscriminatorRole.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestMessageDiscriminatorRole.g.cs new file mode 100644 index 00000000..14cd663f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestMessageDiscriminatorRole.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class ChatCompletionRequestMessageDiscriminatorRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.ChatCompletionRequestMessageDiscriminatorRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.ChatCompletionRequestMessageDiscriminatorRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestMessageDiscriminatorRoleNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestMessageDiscriminatorRoleNullable.g.cs new file mode 100644 index 00000000..3170a33c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestMessageDiscriminatorRoleNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class ChatCompletionRequestMessageDiscriminatorRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.ChatCompletionRequestMessageDiscriminatorRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.ChatCompletionRequestMessageDiscriminatorRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs index 91cff9b0..5a44c5d7 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs @@ -15,68 +15,41 @@ public class ChatCompletionRequestUserMessageContentPartJsonConverter : global:: options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - var - readerCopy = reader; + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + global::OpenAI.ChatCompletionRequestMessageContentPartText? text = default; - try + if (discriminator?.Type == global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType.Text) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); - text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestMessageContentPartText)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.ChatCompletionRequestMessageContentPartImage? image = default; - try + if (discriminator?.Type == global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType.ImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestMessageContentPartImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestMessageContentPartImage).Name}"); - image = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestMessageContentPartImage)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.ChatCompletionRequestMessageContentPartAudio? audio = default; - try + if (discriminator?.Type == global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType.InputAudio) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestMessageContentPartAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestMessageContentPartAudio).Name}"); - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChatCompletionRequestMessageContentPartAudio)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::OpenAI.ChatCompletionRequestUserMessageContentPart( + discriminator?.Type, text, image, audio ); - if (text != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (image != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestMessageContentPartImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestMessageContentPartImage).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (audio != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChatCompletionRequestMessageContentPartAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ChatCompletionRequestMessageContentPartAudio).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - return result; } diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestUserMessageContentPartDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestUserMessageContentPartDiscriminatorType.g.cs new file mode 100644 index 00000000..f3939c9a --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestUserMessageContentPartDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class ChatCompletionRequestUserMessageContentPartDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestUserMessageContentPartDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestUserMessageContentPartDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..964e1161 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestUserMessageContentPartDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class ChatCompletionRequestUserMessageContentPartDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChunkingStrategyRequestParam.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChunkingStrategyRequestParam.g.cs index 4566bfa5..4ceb7f51 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.ChunkingStrategyRequestParam.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.ChunkingStrategyRequestParam.g.cs @@ -15,49 +15,33 @@ public class ChunkingStrategyRequestParamJsonConverter : global::System.Text.Jso options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - var - readerCopy = reader; + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ChunkingStrategyRequestParamDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ChunkingStrategyRequestParamDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + global::OpenAI.AutoChunkingStrategyRequestParam? auto = default; - try + if (discriminator?.Type == global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType.Auto) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AutoChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AutoChunkingStrategyRequestParam).Name}"); - auto = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AutoChunkingStrategyRequestParam)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.StaticChunkingStrategyRequestParam? @static = default; - try + if (discriminator?.Type == global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType.Static) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.StaticChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.StaticChunkingStrategyRequestParam).Name}"); - @static = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.StaticChunkingStrategyRequestParam)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::OpenAI.ChunkingStrategyRequestParam( + discriminator?.Type, auto, @static ); - if (auto != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AutoChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AutoChunkingStrategyRequestParam).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (@static != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.StaticChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.StaticChunkingStrategyRequestParam).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - return result; } diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChunkingStrategyRequestParamDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChunkingStrategyRequestParamDiscriminatorType.g.cs new file mode 100644 index 00000000..168ccdea --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ChunkingStrategyRequestParamDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class ChunkingStrategyRequestParamDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.ChunkingStrategyRequestParamDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.ChunkingStrategyRequestParamDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ChunkingStrategyRequestParamDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ChunkingStrategyRequestParamDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..1482893c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ChunkingStrategyRequestParamDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class ChunkingStrategyRequestParamDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.ChunkingStrategyRequestParamDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.ChunkingStrategyRequestParamDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ContentItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ContentItem.g.cs new file mode 100644 index 00000000..94781420 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ContentItem.g.cs @@ -0,0 +1,99 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ContentItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ContentItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.MessageDeltaContentImageFileObject? messageDeltaImageFileObject = default; + if (discriminator?.Type == global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType.ImageFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageDeltaContentImageFileObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.MessageDeltaContentTextObject? messageDeltaTextObject = default; + if (discriminator?.Type == global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType.Text) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageDeltaContentTextObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.MessageDeltaContentRefusalObject? messageDeltaRefusalObject = default; + if (discriminator?.Type == global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType.Refusal) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageDeltaContentRefusalObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.MessageDeltaContentImageUrlObject? messageDeltaImageUrlObject = default; + if (discriminator?.Type == global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType.ImageUrl) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageDeltaContentImageUrlObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ContentItem( + discriminator?.Type, + messageDeltaImageFileObject, + messageDeltaTextObject, + messageDeltaRefusalObject, + messageDeltaImageUrlObject + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ContentItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsMessageDeltaImageFileObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageDeltaContentImageFileObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaImageFileObject, typeInfo); + } + else if (value.IsMessageDeltaTextObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageDeltaContentTextObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaTextObject, typeInfo); + } + else if (value.IsMessageDeltaRefusalObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageDeltaContentRefusalObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaRefusalObject, typeInfo); + } + else if (value.IsMessageDeltaImageUrlObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageDeltaContentImageUrlObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaImageUrlObject, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ContentItem2.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ContentItem2.g.cs new file mode 100644 index 00000000..caf49be7 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ContentItem2.g.cs @@ -0,0 +1,99 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ContentItem2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ContentItem2 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageObjectContentItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageObjectContentItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.MessageContentImageFileObject? messageImageFileObject = default; + if (discriminator?.Type == global::OpenAI.MessageObjectContentItemDiscriminatorType.ImageFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentImageFileObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.MessageContentImageUrlObject? messageImageUrlObject = default; + if (discriminator?.Type == global::OpenAI.MessageObjectContentItemDiscriminatorType.ImageUrl) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentImageUrlObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.MessageContentTextObject? messageTextObject = default; + if (discriminator?.Type == global::OpenAI.MessageObjectContentItemDiscriminatorType.Text) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentTextObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.MessageContentRefusalObject? messageRefusalObject = default; + if (discriminator?.Type == global::OpenAI.MessageObjectContentItemDiscriminatorType.Refusal) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentRefusalObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ContentItem2( + discriminator?.Type, + messageImageFileObject, + messageImageUrlObject, + messageTextObject, + messageRefusalObject + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ContentItem2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsMessageImageFileObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageContentImageFileObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageImageFileObject, typeInfo); + } + else if (value.IsMessageImageUrlObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageContentImageUrlObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageImageUrlObject, typeInfo); + } + else if (value.IsMessageTextObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageContentTextObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageTextObject, typeInfo); + } + else if (value.IsMessageRefusalObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageContentRefusalObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageRefusalObject, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ContentVariant2Item.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ContentVariant2Item.g.cs new file mode 100644 index 00000000..7c127b87 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ContentVariant2Item.g.cs @@ -0,0 +1,85 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ContentVariant2ItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ContentVariant2Item Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.MessageContentImageFileObject? messageImageFileObject = default; + if (discriminator?.Type == global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType.ImageFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentImageFileObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.MessageContentImageUrlObject? messageImageUrlObject = default; + if (discriminator?.Type == global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType.ImageUrl) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentImageUrlObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.MessageRequestContentTextObject? messageRequestTextObject = default; + if (discriminator?.Type == global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType.Text) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageRequestContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageRequestContentTextObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ContentVariant2Item( + discriminator?.Type, + messageImageFileObject, + messageImageUrlObject, + messageRequestTextObject + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ContentVariant2Item value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsMessageImageFileObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageContentImageFileObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageImageFileObject, typeInfo); + } + else if (value.IsMessageImageUrlObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageContentImageUrlObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageImageUrlObject, typeInfo); + } + else if (value.IsMessageRequestTextObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageRequestContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageRequestContentTextObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageRequestTextObject, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolDiscriminatorType.g.cs new file mode 100644 index 00000000..5a5114ea --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateAssistantRequestToolDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateAssistantRequestToolDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateAssistantRequestToolDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateAssistantRequestToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateAssistantRequestToolDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.CreateAssistantRequestToolDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..156d6549 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateAssistantRequestToolDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateAssistantRequestToolDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateAssistantRequestToolDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateAssistantRequestToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateAssistantRequestToolDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.CreateAssistantRequestToolDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs new file mode 100644 index 00000000..92d98591 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1 = default; + if (discriminator?.Type == global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Auto) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 = default; + if (discriminator?.Type == global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Static) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy( + discriminator?.Type, + value1, + value2 + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsValue1) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs new file mode 100644 index 00000000..bc661fc5 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..7485f0d2 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateChatCompletionRequestResponseFormatDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateChatCompletionRequestResponseFormatDiscriminatorType.g.cs new file mode 100644 index 00000000..644a4c77 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateChatCompletionRequestResponseFormatDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateChatCompletionRequestResponseFormatDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateChatCompletionRequestResponseFormatDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateChatCompletionRequestResponseFormatDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..14feb24b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateChatCompletionRequestResponseFormatDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateChatCompletionRequestResponseFormatDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestAttachmentToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestAttachmentToolDiscriminatorType.g.cs new file mode 100644 index 00000000..444b5845 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestAttachmentToolDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateMessageRequestAttachmentToolDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestAttachmentToolDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestAttachmentToolDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..932d17b7 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestAttachmentToolDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateMessageRequestAttachmentToolDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestContentVariant2ItemDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestContentVariant2ItemDiscriminatorType.g.cs new file mode 100644 index 00000000..7ff1493b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestContentVariant2ItemDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateMessageRequestContentVariant2ItemDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestContentVariant2ItemDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestContentVariant2ItemDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..d37b828f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateMessageRequestContentVariant2ItemDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateMessageRequestContentVariant2ItemDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateModerationRequestInputVariant3ItemDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateModerationRequestInputVariant3ItemDiscriminatorType.g.cs new file mode 100644 index 00000000..554ac874 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateModerationRequestInputVariant3ItemDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateModerationRequestInputVariant3ItemDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateModerationRequestInputVariant3ItemDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateModerationRequestInputVariant3ItemDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..fab34a87 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateModerationRequestInputVariant3ItemDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateModerationRequestInputVariant3ItemDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateRunRequestToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateRunRequestToolDiscriminatorType.g.cs new file mode 100644 index 00000000..a5df23bd --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateRunRequestToolDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateRunRequestToolDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateRunRequestToolDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateRunRequestToolDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateRunRequestToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateRunRequestToolDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.CreateRunRequestToolDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateRunRequestToolDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateRunRequestToolDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..6f6c0d38 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateRunRequestToolDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateRunRequestToolDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateRunRequestToolDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateRunRequestToolDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateRunRequestToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateRunRequestToolDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.CreateRunRequestToolDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant1Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateThreadAndRunRequestToolDiscriminatorType.g.cs similarity index 66% rename from src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant1Event.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.CreateThreadAndRunRequestToolDiscriminatorType.g.cs index 2f0b1958..10e04490 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant1Event.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateThreadAndRunRequestToolDiscriminatorType.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class RunStepStreamEventVariant1EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class CreateThreadAndRunRequestToolDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.RunStepStreamEventVariant1Event Read( + public override global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class RunStepStreamEventVariant1EventJsonConverter : global::Syste var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.RunStepStreamEventVariant1EventExtensions.ToEnum(stringValue) ?? default; + return global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class RunStepStreamEventVariant1EventJsonConverter : global::Syste case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant1Event)numValue; + return (global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class RunStepStreamEventVariant1EventJsonConverter : global::Syste /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant1Event value, + global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant1EventExtensions.ToValueString(value)); + writer.WriteStringValue(global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorTypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant1EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateThreadAndRunRequestToolDiscriminatorTypeNullable.g.cs similarity index 68% rename from src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant1EventNullable.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.CreateThreadAndRunRequestToolDiscriminatorTypeNullable.g.cs index 0487684c..51ee5ef3 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant1EventNullable.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateThreadAndRunRequestToolDiscriminatorTypeNullable.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class RunStepStreamEventVariant1EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class CreateThreadAndRunRequestToolDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.RunStepStreamEventVariant1Event? Read( + public override global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class RunStepStreamEventVariant1EventNullableJsonConverter : globa var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.RunStepStreamEventVariant1EventExtensions.ToEnum(stringValue); + return global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorTypeExtensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class RunStepStreamEventVariant1EventNullableJsonConverter : globa case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant1Event)numValue; + return (global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class RunStepStreamEventVariant1EventNullableJsonConverter : globa /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant1Event? value, + global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant1EventExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorTypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs new file mode 100644 index 00000000..ef7d3afc --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1 = default; + if (discriminator?.Type == global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Auto) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 = default; + if (discriminator?.Type == global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Static) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy( + discriminator?.Type, + value1, + value2 + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsValue1) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs new file mode 100644 index 00000000..3f413755 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..46477ed8 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateVectorStoreRequestChunkingStrategy.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateVectorStoreRequestChunkingStrategy.g.cs new file mode 100644 index 00000000..7830c025 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateVectorStoreRequestChunkingStrategy.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class CreateVectorStoreRequestChunkingStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateVectorStoreRequestChunkingStrategy Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.AutoChunkingStrategyRequestParam? autoParam = default; + if (discriminator?.Type == global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType.Auto) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AutoChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AutoChunkingStrategyRequestParam)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.StaticChunkingStrategyRequestParam? staticParam = default; + if (discriminator?.Type == global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType.Static) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.StaticChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.StaticChunkingStrategyRequestParam)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.CreateVectorStoreRequestChunkingStrategy( + discriminator?.Type, + autoParam, + staticParam + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateVectorStoreRequestChunkingStrategy value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAutoParam) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AutoChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AutoChunkingStrategyRequestParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AutoParam, typeInfo); + } + else if (value.IsStaticParam) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.StaticChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.StaticChunkingStrategyRequestParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.StaticParam, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateVectorStoreRequestChunkingStrategyDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateVectorStoreRequestChunkingStrategyDiscriminatorType.g.cs new file mode 100644 index 00000000..638cda8f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateVectorStoreRequestChunkingStrategyDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..4c273dd5 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.InputVariant3Item.g.cs b/src/libs/OpenAI/Generated/JsonConverters.InputVariant3Item.g.cs new file mode 100644 index 00000000..1fcfba90 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.InputVariant3Item.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class InputVariant3ItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.InputVariant3Item Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1? value1 = default; + if (discriminator?.Type == global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType.ImageUrl) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2? value2 = default; + if (discriminator?.Type == global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType.Text) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.InputVariant3Item( + discriminator?.Type, + value1, + value2 + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.InputVariant3Item value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsValue1) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageContentTextObjectTextAnnotationDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageContentTextObjectTextAnnotationDiscriminatorType.g.cs new file mode 100644 index 00000000..0e659603 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.MessageContentTextObjectTextAnnotationDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class MessageContentTextObjectTextAnnotationDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageContentTextObjectTextAnnotationDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageContentTextObjectTextAnnotationDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..45947067 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.MessageContentTextObjectTextAnnotationDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class MessageContentTextObjectTextAnnotationDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.g.cs new file mode 100644 index 00000000..3b054297 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..0c8546ac --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaObjectDeltaContentItemDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaObjectDeltaContentItemDiscriminatorType.g.cs new file mode 100644 index 00000000..97074ae4 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaObjectDeltaContentItemDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class MessageDeltaObjectDeltaContentItemDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaObjectDeltaContentItemDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaObjectDeltaContentItemDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..529855e0 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.MessageDeltaObjectDeltaContentItemDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class MessageDeltaObjectDeltaContentItemDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageObjectAttachmentToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageObjectAttachmentToolDiscriminatorType.g.cs new file mode 100644 index 00000000..a13ee840 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.MessageObjectAttachmentToolDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class MessageObjectAttachmentToolDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.MessageObjectAttachmentToolDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.MessageObjectAttachmentToolDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.MessageObjectAttachmentToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.MessageObjectAttachmentToolDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.MessageObjectAttachmentToolDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageObjectAttachmentToolDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageObjectAttachmentToolDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..b40828f5 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.MessageObjectAttachmentToolDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class MessageObjectAttachmentToolDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.MessageObjectAttachmentToolDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.MessageObjectAttachmentToolDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.MessageObjectAttachmentToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.MessageObjectAttachmentToolDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.MessageObjectAttachmentToolDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageObjectContentItemDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageObjectContentItemDiscriminatorType.g.cs new file mode 100644 index 00000000..b28e1684 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.MessageObjectContentItemDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class MessageObjectContentItemDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.MessageObjectContentItemDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.MessageObjectContentItemDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.MessageObjectContentItemDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.MessageObjectContentItemDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.MessageObjectContentItemDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageObjectContentItemDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageObjectContentItemDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..5c4c8248 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.MessageObjectContentItemDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class MessageObjectContentItemDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.MessageObjectContentItemDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.MessageObjectContentItemDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.MessageObjectContentItemDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.MessageObjectContentItemDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.MessageObjectContentItemDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEvent.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEvent.g.cs deleted file mode 100644 index 6a6c582b..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEvent.g.cs +++ /dev/null @@ -1,162 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace OpenAI.JsonConverters -{ - /// - public class MessageStreamEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.MessageStreamEvent Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - var - readerCopy = reader; - global::OpenAI.MessageStreamEventVariant1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.MessageStreamEventVariant2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.MessageStreamEventVariant3? value3 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant3).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.MessageStreamEventVariant4? value4 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant4).Name}"); - value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.MessageStreamEventVariant5? value5 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant5).Name}"); - value5 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::OpenAI.MessageStreamEvent( - value1, - value2, - value3, - value4, - value5 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value3 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant3).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value4 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant4).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value5 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant5).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.MessageStreamEvent value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsValue1) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - else if (value.IsValue3) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); - } - else if (value.IsValue4) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); - } - else if (value.IsValue5) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageStreamEventVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant5Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant5Event.g.cs deleted file mode 100644 index 73203fd2..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant5Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class MessageStreamEventVariant5EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.MessageStreamEventVariant5Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.MessageStreamEventVariant5EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.MessageStreamEventVariant5Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.MessageStreamEventVariant5Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.MessageStreamEventVariant5EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant5EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant5EventNullable.g.cs deleted file mode 100644 index 07898620..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.MessageStreamEventVariant5EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class MessageStreamEventVariant5EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.MessageStreamEventVariant5Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.MessageStreamEventVariant5EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.MessageStreamEventVariant5Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.MessageStreamEventVariant5Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.MessageStreamEventVariant5EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ModifyAssistantRequestToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ModifyAssistantRequestToolDiscriminatorType.g.cs new file mode 100644 index 00000000..134890d8 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ModifyAssistantRequestToolDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class ModifyAssistantRequestToolDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ModifyAssistantRequestToolDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.ModifyAssistantRequestToolDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.ModifyAssistantRequestToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ModifyAssistantRequestToolDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.ModifyAssistantRequestToolDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ModifyAssistantRequestToolDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ModifyAssistantRequestToolDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..efab1370 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ModifyAssistantRequestToolDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class ModifyAssistantRequestToolDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ModifyAssistantRequestToolDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.ModifyAssistantRequestToolDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.ModifyAssistantRequestToolDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ModifyAssistantRequestToolDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.ModifyAssistantRequestToolDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEvent.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEvent.g.cs index aa9f3d3f..9014eb8c 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEvent.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEvent.g.cs @@ -15,344 +15,211 @@ public class RealtimeServerEventJsonConverter : global::System.Text.Json.Seriali options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - var - readerCopy = reader; + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeServerEventDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeServerEventDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + global::OpenAI.RealtimeError? error = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.Error) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeError).Name}"); - error = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeError)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeSessionCreated? sessionCreated = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.SessionCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeSessionCreated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeSessionCreated).Name}"); - sessionCreated = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeSessionCreated)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeSessionUpdated? sessionUpdated = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.SessionUpdated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeSessionUpdated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeSessionUpdated).Name}"); - sessionUpdated = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeSessionUpdated)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeConversationCreated? conversationCreated = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ConversationCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationCreated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationCreated).Name}"); - conversationCreated = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeConversationCreated)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeConversationItemCreated? conversationItemCreated = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ConversationItemCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationItemCreated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationItemCreated).Name}"); - conversationItemCreated = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeConversationItemCreated)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? conversationItemInputAudioTranscriptionCompleted = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ConversationItemInputAudioTranscriptionCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted).Name}"); - conversationItemInputAudioTranscriptionCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? conversationItemInputAudioTranscriptionFailed = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ConversationItemInputAudioTranscriptionFailed) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed).Name}"); - conversationItemInputAudioTranscriptionFailed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeConversationItemTruncated? conversationItemTruncated = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ConversationItemTruncated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationItemTruncated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationItemTruncated).Name}"); - conversationItemTruncated = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeConversationItemTruncated)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeConversationItemDeleted? conversationItemDeleted = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ConversationItemDeleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationItemDeleted), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationItemDeleted).Name}"); - conversationItemDeleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeConversationItemDeleted)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeInputAudioBufferCommitted? inputAudioBufferCommitted = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.InputAudioBufferCommitted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeInputAudioBufferCommitted), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeInputAudioBufferCommitted).Name}"); - inputAudioBufferCommitted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeInputAudioBufferCommitted)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeInputAudioBufferCleared? inputAudioBufferCleared = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.InputAudioBufferCleared) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeInputAudioBufferCleared), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeInputAudioBufferCleared).Name}"); - inputAudioBufferCleared = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeInputAudioBufferCleared)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeInputAudioBufferSpeechStarted? inputAudioBufferSpeechStarted = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.InputAudioBufferSpeechStarted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeInputAudioBufferSpeechStarted), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeInputAudioBufferSpeechStarted).Name}"); - inputAudioBufferSpeechStarted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeInputAudioBufferSpeechStarted)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeInputAudioBufferSpeechStopped? inputAudioBufferSpeechStopped = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.InputAudioBufferSpeechStopped) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeInputAudioBufferSpeechStopped), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeInputAudioBufferSpeechStopped).Name}"); - inputAudioBufferSpeechStopped = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeInputAudioBufferSpeechStopped)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseCreated? responseCreated = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseCreated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseCreated).Name}"); - responseCreated = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseCreated)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseDone? responseDone = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseDone).Name}"); - responseDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseDone)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseOutputItemAdded? responseOutputItemAdded = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseOutputItemAdded) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseOutputItemAdded), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseOutputItemAdded).Name}"); - responseOutputItemAdded = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseOutputItemAdded)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseOutputItemDone? responseOutputItemDone = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseOutputItemDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseOutputItemDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseOutputItemDone).Name}"); - responseOutputItemDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseOutputItemDone)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseContentPartAdded? responseContentPartAdded = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseContentPartAdded) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseContentPartAdded), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseContentPartAdded).Name}"); - responseContentPartAdded = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseContentPartAdded)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseContentPartDone? responseContentPartDone = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseContentPartDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseContentPartDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseContentPartDone).Name}"); - responseContentPartDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseContentPartDone)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseTextDelta? responseTextDelta = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseTextDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseTextDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseTextDelta).Name}"); - responseTextDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseTextDelta)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseTextDone? responseTextDone = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseTextDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseTextDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseTextDone).Name}"); - responseTextDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseTextDone)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseAudioTranscriptDelta? responseAudioTranscriptDelta = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseAudioTranscriptDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseAudioTranscriptDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseAudioTranscriptDelta).Name}"); - responseAudioTranscriptDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseAudioTranscriptDelta)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseAudioTranscriptDone? responseAudioTranscriptDone = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseAudioTranscriptDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseAudioTranscriptDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseAudioTranscriptDone).Name}"); - responseAudioTranscriptDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseAudioTranscriptDone)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseAudioDelta? responseAudioDelta = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseAudioDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseAudioDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseAudioDelta).Name}"); - responseAudioDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseAudioDelta)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseAudioDone? responseAudioDone = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseAudioDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseAudioDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseAudioDone).Name}"); - responseAudioDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseAudioDone)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseFunctionCallArgumentsDelta? responseFunctionCallArgumentsDelta = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseFunctionCallArgumentsDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseFunctionCallArgumentsDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseFunctionCallArgumentsDelta).Name}"); - responseFunctionCallArgumentsDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseFunctionCallArgumentsDelta)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeResponseFunctionCallArgumentsDone? responseFunctionCallArgumentsDone = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.ResponseFunctionCallArgumentsDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseFunctionCallArgumentsDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseFunctionCallArgumentsDone).Name}"); - responseFunctionCallArgumentsDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeResponseFunctionCallArgumentsDone)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - - readerCopy = reader; global::OpenAI.RealtimeRateLimitsUpdated? rateLimitsUpdated = default; - try + if (discriminator?.Type == global::OpenAI.RealtimeServerEventDiscriminatorType.RateLimitsUpdated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeRateLimitsUpdated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeRateLimitsUpdated).Name}"); - rateLimitsUpdated = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RealtimeRateLimitsUpdated)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::OpenAI.RealtimeServerEvent( + discriminator?.Type, error, sessionCreated, sessionUpdated, @@ -383,175 +250,6 @@ public class RealtimeServerEventJsonConverter : global::System.Text.Json.Seriali rateLimitsUpdated ); - if (error != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeError).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (sessionCreated != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeSessionCreated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeSessionCreated).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (sessionUpdated != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeSessionUpdated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeSessionUpdated).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (conversationCreated != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationCreated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationCreated).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (conversationItemCreated != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationItemCreated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationItemCreated).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (conversationItemInputAudioTranscriptionCompleted != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (conversationItemInputAudioTranscriptionFailed != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (conversationItemTruncated != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationItemTruncated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationItemTruncated).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (conversationItemDeleted != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeConversationItemDeleted), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeConversationItemDeleted).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (inputAudioBufferCommitted != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeInputAudioBufferCommitted), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeInputAudioBufferCommitted).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (inputAudioBufferCleared != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeInputAudioBufferCleared), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeInputAudioBufferCleared).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (inputAudioBufferSpeechStarted != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeInputAudioBufferSpeechStarted), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeInputAudioBufferSpeechStarted).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (inputAudioBufferSpeechStopped != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeInputAudioBufferSpeechStopped), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeInputAudioBufferSpeechStopped).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseCreated != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseCreated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseCreated).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseDone != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseDone).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseOutputItemAdded != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseOutputItemAdded), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseOutputItemAdded).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseOutputItemDone != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseOutputItemDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseOutputItemDone).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseContentPartAdded != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseContentPartAdded), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseContentPartAdded).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseContentPartDone != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseContentPartDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseContentPartDone).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseTextDelta != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseTextDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseTextDelta).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseTextDone != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseTextDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseTextDone).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseAudioTranscriptDelta != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseAudioTranscriptDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseAudioTranscriptDelta).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseAudioTranscriptDone != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseAudioTranscriptDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseAudioTranscriptDone).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseAudioDelta != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseAudioDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseAudioDelta).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseAudioDone != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseAudioDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseAudioDone).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseFunctionCallArgumentsDelta != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseFunctionCallArgumentsDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseFunctionCallArgumentsDelta).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (responseFunctionCallArgumentsDone != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeResponseFunctionCallArgumentsDone), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeResponseFunctionCallArgumentsDone).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (rateLimitsUpdated != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RealtimeRateLimitsUpdated), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RealtimeRateLimitsUpdated).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - return result; } diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventDiscriminatorType.g.cs new file mode 100644 index 00000000..7946777b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..0287d8ff --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ResponseFormat.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ResponseFormat.g.cs new file mode 100644 index 00000000..7d3ab4d6 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ResponseFormat.g.cs @@ -0,0 +1,85 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ResponseFormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ResponseFormat Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.ResponseFormatText? text = default; + if (discriminator?.Type == global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType.Text) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ResponseFormatText)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.ResponseFormatJsonObject? jsonObject = default; + if (discriminator?.Type == global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType.JsonObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ResponseFormatJsonObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.ResponseFormatJsonSchema? jsonSchema = default; + if (discriminator?.Type == global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType.JsonSchema) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ResponseFormatJsonSchema)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ResponseFormat( + discriminator?.Type, + text, + jsonObject, + jsonSchema + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ResponseFormat value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ResponseFormatText).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); + } + else if (value.IsJsonObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ResponseFormatJsonObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonObject, typeInfo); + } + else if (value.IsJsonSchema) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ResponseFormatJsonSchema).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonSchema, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ThreadStreamEventVariant1Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunObjectToolDiscriminatorType.g.cs similarity index 70% rename from src/libs/OpenAI/Generated/JsonConverters.ThreadStreamEventVariant1Event.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.RunObjectToolDiscriminatorType.g.cs index 52a70b51..d192c5a2 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.ThreadStreamEventVariant1Event.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.RunObjectToolDiscriminatorType.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class ThreadStreamEventVariant1EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class RunObjectToolDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.ThreadStreamEventVariant1Event Read( + public override global::OpenAI.RunObjectToolDiscriminatorType Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ThreadStreamEventVariant1EventJsonConverter : global::System var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.ThreadStreamEventVariant1EventExtensions.ToEnum(stringValue) ?? default; + return global::OpenAI.RunObjectToolDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class ThreadStreamEventVariant1EventJsonConverter : global::System case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.ThreadStreamEventVariant1Event)numValue; + return (global::OpenAI.RunObjectToolDiscriminatorType)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class ThreadStreamEventVariant1EventJsonConverter : global::System /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.ThreadStreamEventVariant1Event value, + global::OpenAI.RunObjectToolDiscriminatorType value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::OpenAI.ThreadStreamEventVariant1EventExtensions.ToValueString(value)); + writer.WriteStringValue(global::OpenAI.RunObjectToolDiscriminatorTypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.ThreadStreamEventVariant1EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunObjectToolDiscriminatorTypeNullable.g.cs similarity index 72% rename from src/libs/OpenAI/Generated/JsonConverters.ThreadStreamEventVariant1EventNullable.g.cs rename to src/libs/OpenAI/Generated/JsonConverters.RunObjectToolDiscriminatorTypeNullable.g.cs index 3647ace3..ccba245c 100644 --- a/src/libs/OpenAI/Generated/JsonConverters.ThreadStreamEventVariant1EventNullable.g.cs +++ b/src/libs/OpenAI/Generated/JsonConverters.RunObjectToolDiscriminatorTypeNullable.g.cs @@ -3,10 +3,10 @@ namespace OpenAI.JsonConverters { /// - public sealed class ThreadStreamEventVariant1EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class RunObjectToolDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenAI.ThreadStreamEventVariant1Event? Read( + public override global::OpenAI.RunObjectToolDiscriminatorType? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ThreadStreamEventVariant1EventNullableJsonConverter : global var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenAI.ThreadStreamEventVariant1EventExtensions.ToEnum(stringValue); + return global::OpenAI.RunObjectToolDiscriminatorTypeExtensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class ThreadStreamEventVariant1EventNullableJsonConverter : global case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenAI.ThreadStreamEventVariant1Event)numValue; + return (global::OpenAI.RunObjectToolDiscriminatorType)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class ThreadStreamEventVariant1EventNullableJsonConverter : global /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.ThreadStreamEventVariant1Event? value, + global::OpenAI.RunObjectToolDiscriminatorType? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::OpenAI.ThreadStreamEventVariant1EventExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::OpenAI.RunObjectToolDiscriminatorTypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaObjectDeltaStepDetails.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaObjectDeltaStepDetails.g.cs new file mode 100644 index 00000000..b76658fa --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaObjectDeltaStepDetails.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class RunStepDeltaObjectDeltaStepDetailsJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDeltaObjectDeltaStepDetails Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject? messageCreation = default; + if (discriminator?.Type == global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.MessageCreation) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.RunStepDeltaStepDetailsToolCallsObject? toolCalls = default; + if (discriminator?.Type == global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.ToolCalls) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDeltaStepDetailsToolCallsObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.RunStepDeltaObjectDeltaStepDetails( + discriminator?.Type, + messageCreation, + toolCalls + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDeltaObjectDeltaStepDetails value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsMessageCreation) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageCreation, typeInfo); + } + else if (value.IsToolCalls) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCalls, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.g.cs new file mode 100644 index 00000000..5601c0ba --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..e3b3ed6b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs new file mode 100644 index 00000000..e3b1aec3 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? logs = default; + if (discriminator?.Type == global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Logs) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? image = default; + if (discriminator?.Type == global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Image) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput( + discriminator?.Type, + logs, + image + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsLogs) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Logs, typeInfo); + } + else if (value.IsImage) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs new file mode 100644 index 00000000..8afa469d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..b410291b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs new file mode 100644 index 00000000..1aa97a85 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..ad96e473 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs new file mode 100644 index 00000000..cfefa0ea --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? logs = default; + if (discriminator?.Type == global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Logs) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? image = default; + if (discriminator?.Type == global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Image) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput( + discriminator?.Type, + logs, + image + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsLogs) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Logs, typeInfo); + } + else if (value.IsImage) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs new file mode 100644 index 00000000..245fd15f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..5fc97613 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs new file mode 100644 index 00000000..f9050b9c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..6f19673f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepObjectStepDetails.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepObjectStepDetails.g.cs new file mode 100644 index 00000000..51f22b7c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepObjectStepDetails.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class RunStepObjectStepDetailsJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepObjectStepDetails Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepObjectStepDetailsDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepObjectStepDetailsDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.RunStepDetailsMessageCreationObject? messageCreation = default; + if (discriminator?.Type == global::OpenAI.RunStepObjectStepDetailsDiscriminatorType.MessageCreation) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsMessageCreationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDetailsMessageCreationObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.RunStepDetailsToolCallsObject? toolCalls = default; + if (discriminator?.Type == global::OpenAI.RunStepObjectStepDetailsDiscriminatorType.ToolCalls) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDetailsToolCallsObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.RunStepObjectStepDetails( + discriminator?.Type, + messageCreation, + toolCalls + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepObjectStepDetails value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsMessageCreation) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsMessageCreationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDetailsMessageCreationObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageCreation, typeInfo); + } + else if (value.IsToolCalls) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDetailsToolCallsObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCalls, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepObjectStepDetailsDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepObjectStepDetailsDiscriminatorType.g.cs new file mode 100644 index 00000000..dbc5c58a --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepObjectStepDetailsDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepObjectStepDetailsDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepObjectStepDetailsDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepObjectStepDetailsDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepObjectStepDetailsDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepObjectStepDetailsDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RunStepObjectStepDetailsDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepObjectStepDetailsDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepObjectStepDetailsDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..b7cd3c1d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RunStepObjectStepDetailsDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RunStepObjectStepDetailsDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RunStepObjectStepDetailsDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RunStepObjectStepDetailsDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RunStepObjectStepDetailsDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RunStepObjectStepDetailsDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RunStepObjectStepDetailsDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEvent.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEvent.g.cs deleted file mode 100644 index b7b06e29..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEvent.g.cs +++ /dev/null @@ -1,212 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace OpenAI.JsonConverters -{ - /// - public class RunStepStreamEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEvent Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - var - readerCopy = reader; - global::OpenAI.RunStepStreamEventVariant1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStepStreamEventVariant2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStepStreamEventVariant3? value3 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant3).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStepStreamEventVariant4? value4 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant4).Name}"); - value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStepStreamEventVariant5? value5 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant5).Name}"); - value5 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStepStreamEventVariant6? value6 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant6).Name}"); - value6 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStepStreamEventVariant7? value7 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant7).Name}"); - value7 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::OpenAI.RunStepStreamEvent( - value1, - value2, - value3, - value4, - value5, - value6, - value7 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value3 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant3).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value4 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant4).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value5 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant5).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value6 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant6).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value7 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant7).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEvent value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsValue1) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - else if (value.IsValue3) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); - } - else if (value.IsValue4) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); - } - else if (value.IsValue5) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5, typeInfo); - } - else if (value.IsValue6) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value6, typeInfo); - } - else if (value.IsValue7) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepStreamEventVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepStreamEventVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value7, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant2Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant2Event.g.cs deleted file mode 100644 index d7ea697c..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant2Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant2EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant2Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant2EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant2Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant2Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant2EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant2EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant2EventNullable.g.cs deleted file mode 100644 index c2217252..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant2EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant2EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant2Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant2EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant2Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant2Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant2EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant3Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant3Event.g.cs deleted file mode 100644 index 380ee953..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant3Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant3EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant3Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant3EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant3Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant3Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant3EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant3EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant3EventNullable.g.cs deleted file mode 100644 index 52b8dcb4..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant3EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant3EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant3Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant3EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant3Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant3Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant3EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant4Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant4Event.g.cs deleted file mode 100644 index 33b97b11..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant4Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant4EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant4Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant4EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant4Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant4Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant4EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant4EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant4EventNullable.g.cs deleted file mode 100644 index 0a52d362..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant4EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant4EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant4Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant4EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant4Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant4Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant4EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant5Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant5Event.g.cs deleted file mode 100644 index 1bd8fe6f..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant5Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant5EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant5Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant5EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant5Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant5Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant5EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant5EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant5EventNullable.g.cs deleted file mode 100644 index 0f7f4acf..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant5EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant5EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant5Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant5EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant5Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant5Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant5EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant6Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant6Event.g.cs deleted file mode 100644 index f89035f4..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant6Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant6EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant6Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant6EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant6Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant6Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant6EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant6EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant6EventNullable.g.cs deleted file mode 100644 index 2897495b..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant6EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant6EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant6Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant6EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant6Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant6Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant6EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant7Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant7Event.g.cs deleted file mode 100644 index cf31a4db..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant7Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant7EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant7Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant7EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant7Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant7Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant7EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant7EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant7EventNullable.g.cs deleted file mode 100644 index e5912431..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStepStreamEventVariant7EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStepStreamEventVariant7EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStepStreamEventVariant7Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStepStreamEventVariant7EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStepStreamEventVariant7Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStepStreamEventVariant7Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStepStreamEventVariant7EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEvent.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEvent.g.cs deleted file mode 100644 index 9d74d1d5..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEvent.g.cs +++ /dev/null @@ -1,287 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace OpenAI.JsonConverters -{ - /// - public class RunStreamEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEvent Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - var - readerCopy = reader; - global::OpenAI.RunStreamEventVariant1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStreamEventVariant2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStreamEventVariant3? value3 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant3).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStreamEventVariant4? value4 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant4).Name}"); - value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStreamEventVariant5? value5 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant5).Name}"); - value5 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStreamEventVariant6? value6 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant6).Name}"); - value6 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStreamEventVariant7? value7 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant7).Name}"); - value7 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStreamEventVariant8? value8 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant8).Name}"); - value8 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStreamEventVariant9? value9 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant9).Name}"); - value9 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::OpenAI.RunStreamEventVariant10? value10 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant10).Name}"); - value10 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::OpenAI.RunStreamEvent( - value1, - value2, - value3, - value4, - value5, - value6, - value7, - value8, - value9, - value10 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value3 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant3).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value4 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant4).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value5 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant5).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value6 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant6).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value7 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant7).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value8 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant8).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value9 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant9).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value10 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant10).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEvent value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsValue1) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - else if (value.IsValue3) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); - } - else if (value.IsValue4) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); - } - else if (value.IsValue5) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5, typeInfo); - } - else if (value.IsValue6) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value6, typeInfo); - } - else if (value.IsValue7) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value7, typeInfo); - } - else if (value.IsValue8) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value8, typeInfo); - } - else if (value.IsValue9) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value9, typeInfo); - } - else if (value.IsValue10) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStreamEventVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStreamEventVariant10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value10, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant10Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant10Event.g.cs deleted file mode 100644 index fcad67e0..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant10Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant10EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant10Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant10EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant10Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant10Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant10EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant10EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant10EventNullable.g.cs deleted file mode 100644 index 0c3d0238..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant10EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant10EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant10Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant10EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant10Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant10Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant10EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant1Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant1Event.g.cs deleted file mode 100644 index d9473381..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant1Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant1EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant1Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant1EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant1Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant1Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant1EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant1EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant1EventNullable.g.cs deleted file mode 100644 index be3b0ebb..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant1EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant1EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant1Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant1EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant1Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant1Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant1EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant2Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant2Event.g.cs deleted file mode 100644 index 16d53416..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant2Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant2EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant2Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant2EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant2Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant2Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant2EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant2EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant2EventNullable.g.cs deleted file mode 100644 index 80aa81b4..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant2EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant2EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant2Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant2EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant2Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant2Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant2EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant3Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant3Event.g.cs deleted file mode 100644 index 9b5c5cb7..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant3Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant3EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant3Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant3EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant3Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant3Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant3EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant3EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant3EventNullable.g.cs deleted file mode 100644 index 4be956d9..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant3EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant3EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant3Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant3EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant3Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant3Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant3EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant4Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant4Event.g.cs deleted file mode 100644 index 5a716f63..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant4Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant4EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant4Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant4EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant4Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant4Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant4EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant4EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant4EventNullable.g.cs deleted file mode 100644 index 29a8ba9d..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant4EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant4EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant4Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant4EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant4Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant4Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant4EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant5Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant5Event.g.cs deleted file mode 100644 index dafe4486..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant5Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant5EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant5Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant5EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant5Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant5Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant5EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant5EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant5EventNullable.g.cs deleted file mode 100644 index d52b9389..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant5EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant5EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant5Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant5EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant5Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant5Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant5EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant6Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant6Event.g.cs deleted file mode 100644 index 2c6e7afd..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant6Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant6EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant6Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant6EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant6Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant6Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant6EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant6EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant6EventNullable.g.cs deleted file mode 100644 index 6c0dec23..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant6EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant6EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant6Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant6EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant6Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant6Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant6EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant7Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant7Event.g.cs deleted file mode 100644 index 93efaa48..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant7Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant7EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant7Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant7EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant7Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant7Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant7EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant7EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant7EventNullable.g.cs deleted file mode 100644 index d7ae41c8..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant7EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant7EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant7Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant7EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant7Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant7Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant7EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant8Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant8Event.g.cs deleted file mode 100644 index c813c758..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant8Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant8EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant8Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant8EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant8Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant8Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant8EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant8EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant8EventNullable.g.cs deleted file mode 100644 index 6f893293..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant8EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant8EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant8Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant8EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant8Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant8Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant8EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant9Event.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant9Event.g.cs deleted file mode 100644 index ae3e1c8a..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant9Event.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant9EventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant9Event Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant9EventExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant9Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant9Event value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant9EventExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant9EventNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant9EventNullable.g.cs deleted file mode 100644 index 7ec91c00..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.RunStreamEventVariant9EventNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenAI.JsonConverters -{ - /// - public sealed class RunStreamEventVariant9EventNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.RunStreamEventVariant9Event? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::OpenAI.RunStreamEventVariant9EventExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::OpenAI.RunStreamEventVariant9Event)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.RunStreamEventVariant9Event? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::OpenAI.RunStreamEventVariant9EventExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ThreadStreamEvent.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ThreadStreamEvent.g.cs deleted file mode 100644 index 8f50815c..00000000 --- a/src/libs/OpenAI/Generated/JsonConverters.ThreadStreamEvent.g.cs +++ /dev/null @@ -1,62 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace OpenAI.JsonConverters -{ - /// - public class ThreadStreamEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::OpenAI.ThreadStreamEvent Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - var - readerCopy = reader; - global::OpenAI.ThreadStreamEventVariant1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ThreadStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ThreadStreamEventVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::OpenAI.ThreadStreamEvent( - value1 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ThreadStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ThreadStreamEventVariant1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::OpenAI.ThreadStreamEvent value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsValue1) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ThreadStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.ThreadStreamEventVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ToolCallsItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ToolCallsItem.g.cs new file mode 100644 index 00000000..e1556522 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ToolCallsItem.g.cs @@ -0,0 +1,85 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ToolCallsItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ToolCallsItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? runStepDeltaDetailsCodeObject = default; + if (discriminator?.Type == global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.CodeInterpreter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? runStepDeltaDetailsFileSearchObject = default; + if (discriminator?.Type == global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.FileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? runStepDeltaDetailsFunctionObject = default; + if (discriminator?.Type == global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.Function) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ToolCallsItem( + discriminator?.Type, + runStepDeltaDetailsCodeObject, + runStepDeltaDetailsFileSearchObject, + runStepDeltaDetailsFunctionObject + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ToolCallsItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsRunStepDeltaDetailsCodeObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDeltaDetailsCodeObject, typeInfo); + } + else if (value.IsRunStepDeltaDetailsFileSearchObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDeltaDetailsFileSearchObject, typeInfo); + } + else if (value.IsRunStepDeltaDetailsFunctionObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDeltaDetailsFunctionObject, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ToolCallsItem2.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ToolCallsItem2.g.cs new file mode 100644 index 00000000..89978762 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ToolCallsItem2.g.cs @@ -0,0 +1,85 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ToolCallsItem2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ToolCallsItem2 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.RunStepDetailsToolCallsCodeObject? runStepDetailsCodeObject = default; + if (discriminator?.Type == global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.CodeInterpreter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDetailsToolCallsCodeObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.RunStepDetailsToolCallsFileSearchObject? runStepDetailsFileSearchObject = default; + if (discriminator?.Type == global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.FileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDetailsToolCallsFileSearchObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.RunStepDetailsToolCallsFunctionObject? runStepDetailsFunctionObject = default; + if (discriminator?.Type == global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.Function) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunStepDetailsToolCallsFunctionObject)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ToolCallsItem2( + discriminator?.Type, + runStepDetailsCodeObject, + runStepDetailsFileSearchObject, + runStepDetailsFunctionObject + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ToolCallsItem2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsRunStepDetailsCodeObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDetailsToolCallsCodeObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDetailsCodeObject, typeInfo); + } + else if (value.IsRunStepDetailsFileSearchObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDetailsToolCallsFileSearchObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDetailsFileSearchObject, typeInfo); + } + else if (value.IsRunStepDetailsFunctionObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.RunStepDetailsToolCallsFunctionObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDetailsFunctionObject, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ToolsItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem.g.cs new file mode 100644 index 00000000..d74b20f9 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem.g.cs @@ -0,0 +1,85 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ToolsItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ToolsItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantObjectToolDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantObjectToolDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.AssistantToolsCode? assistantCode = default; + if (discriminator?.Type == global::OpenAI.AssistantObjectToolDiscriminatorType.CodeInterpreter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsCode)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch = default; + if (discriminator?.Type == global::OpenAI.AssistantObjectToolDiscriminatorType.FileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFileSearch)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFunction? assistantFunction = default; + if (discriminator?.Type == global::OpenAI.AssistantObjectToolDiscriminatorType.Function) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFunction)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ToolsItem( + discriminator?.Type, + assistantCode, + assistantFileSearch, + assistantFunction + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ToolsItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAssistantCode) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsCode).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + } + else if (value.IsAssistantFileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFileSearch).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + } + else if (value.IsAssistantFunction) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFunction).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ToolsItem2.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem2.g.cs new file mode 100644 index 00000000..5dc3be00 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem2.g.cs @@ -0,0 +1,85 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ToolsItem2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ToolsItem2 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateAssistantRequestToolDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateAssistantRequestToolDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.AssistantToolsCode? assistantCode = default; + if (discriminator?.Type == global::OpenAI.CreateAssistantRequestToolDiscriminatorType.CodeInterpreter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsCode)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch = default; + if (discriminator?.Type == global::OpenAI.CreateAssistantRequestToolDiscriminatorType.FileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFileSearch)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFunction? assistantFunction = default; + if (discriminator?.Type == global::OpenAI.CreateAssistantRequestToolDiscriminatorType.Function) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFunction)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ToolsItem2( + discriminator?.Type, + assistantCode, + assistantFileSearch, + assistantFunction + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ToolsItem2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAssistantCode) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsCode).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + } + else if (value.IsAssistantFileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFileSearch).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + } + else if (value.IsAssistantFunction) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFunction).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ToolsItem3.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem3.g.cs new file mode 100644 index 00000000..e9feb4e0 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem3.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ToolsItem3JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ToolsItem3 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateMessageRequestAttachmentToolDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateMessageRequestAttachmentToolDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.AssistantToolsCode? assistantCode = default; + if (discriminator?.Type == global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType.CodeInterpreter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsCode)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly = default; + if (discriminator?.Type == global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType.FileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearchTypeOnly), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFileSearchTypeOnly)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ToolsItem3( + discriminator?.Type, + assistantCode, + assistantFileSearchTypeOnly + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ToolsItem3 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAssistantCode) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsCode).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + } + else if (value.IsAssistantFileSearchTypeOnly) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearchTypeOnly), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFileSearchTypeOnly).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearchTypeOnly, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ToolsItem4.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem4.g.cs new file mode 100644 index 00000000..6d86c854 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem4.g.cs @@ -0,0 +1,85 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ToolsItem4JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ToolsItem4 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateRunRequestToolDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateRunRequestToolDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.AssistantToolsCode? assistantCode = default; + if (discriminator?.Type == global::OpenAI.CreateRunRequestToolDiscriminatorType.CodeInterpreter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsCode)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch = default; + if (discriminator?.Type == global::OpenAI.CreateRunRequestToolDiscriminatorType.FileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFileSearch)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFunction? assistantFunction = default; + if (discriminator?.Type == global::OpenAI.CreateRunRequestToolDiscriminatorType.Function) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFunction)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ToolsItem4( + discriminator?.Type, + assistantCode, + assistantFileSearch, + assistantFunction + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ToolsItem4 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAssistantCode) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsCode).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + } + else if (value.IsAssistantFileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFileSearch).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + } + else if (value.IsAssistantFunction) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFunction).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ToolsItem5.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem5.g.cs new file mode 100644 index 00000000..8ec554a4 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem5.g.cs @@ -0,0 +1,85 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ToolsItem5JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ToolsItem5 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CreateThreadAndRunRequestToolDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CreateThreadAndRunRequestToolDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.AssistantToolsCode? assistantCode = default; + if (discriminator?.Type == global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType.CodeInterpreter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsCode)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch = default; + if (discriminator?.Type == global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType.FileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFileSearch)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFunction? assistantFunction = default; + if (discriminator?.Type == global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType.Function) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFunction)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ToolsItem5( + discriminator?.Type, + assistantCode, + assistantFileSearch, + assistantFunction + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ToolsItem5 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAssistantCode) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsCode).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + } + else if (value.IsAssistantFileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFileSearch).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + } + else if (value.IsAssistantFunction) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFunction).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ToolsItem6.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem6.g.cs new file mode 100644 index 00000000..b0f541e3 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem6.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ToolsItem6JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ToolsItem6 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageObjectAttachmentToolDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageObjectAttachmentToolDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.AssistantToolsCode? assistantCode = default; + if (discriminator?.Type == global::OpenAI.MessageObjectAttachmentToolDiscriminatorType.CodeInterpreter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsCode)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly = default; + if (discriminator?.Type == global::OpenAI.MessageObjectAttachmentToolDiscriminatorType.FileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearchTypeOnly), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFileSearchTypeOnly)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ToolsItem6( + discriminator?.Type, + assistantCode, + assistantFileSearchTypeOnly + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ToolsItem6 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAssistantCode) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsCode).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + } + else if (value.IsAssistantFileSearchTypeOnly) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearchTypeOnly), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFileSearchTypeOnly).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearchTypeOnly, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ToolsItem7.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem7.g.cs new file mode 100644 index 00000000..c0e5cd6d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem7.g.cs @@ -0,0 +1,85 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ToolsItem7JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ToolsItem7 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.ModifyAssistantRequestToolDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.ModifyAssistantRequestToolDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.AssistantToolsCode? assistantCode = default; + if (discriminator?.Type == global::OpenAI.ModifyAssistantRequestToolDiscriminatorType.CodeInterpreter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsCode)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch = default; + if (discriminator?.Type == global::OpenAI.ModifyAssistantRequestToolDiscriminatorType.FileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFileSearch)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFunction? assistantFunction = default; + if (discriminator?.Type == global::OpenAI.ModifyAssistantRequestToolDiscriminatorType.Function) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFunction)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ToolsItem7( + discriminator?.Type, + assistantCode, + assistantFileSearch, + assistantFunction + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ToolsItem7 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAssistantCode) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsCode).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + } + else if (value.IsAssistantFileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFileSearch).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + } + else if (value.IsAssistantFunction) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFunction).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.ToolsItem8.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem8.g.cs new file mode 100644 index 00000000..24dc191b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ToolsItem8.g.cs @@ -0,0 +1,85 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ToolsItem8JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ToolsItem8 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.RunObjectToolDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.RunObjectToolDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.AssistantToolsCode? assistantCode = default; + if (discriminator?.Type == global::OpenAI.RunObjectToolDiscriminatorType.CodeInterpreter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsCode)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch = default; + if (discriminator?.Type == global::OpenAI.RunObjectToolDiscriminatorType.FileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFileSearch)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.AssistantToolsFunction? assistantFunction = default; + if (discriminator?.Type == global::OpenAI.RunObjectToolDiscriminatorType.Function) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.AssistantToolsFunction)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ToolsItem8( + discriminator?.Type, + assistantCode, + assistantFileSearch, + assistantFunction + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ToolsItem8 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAssistantCode) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsCode).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + } + else if (value.IsAssistantFileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFileSearch).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + } + else if (value.IsAssistantFunction) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.AssistantToolsFunction).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.VectorStoreFileObjectChunkingStrategy.g.cs b/src/libs/OpenAI/Generated/JsonConverters.VectorStoreFileObjectChunkingStrategy.g.cs new file mode 100644 index 00000000..ddaa400b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.VectorStoreFileObjectChunkingStrategy.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class VectorStoreFileObjectChunkingStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.VectorStoreFileObjectChunkingStrategy Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.StaticChunkingStrategyResponseParam? staticResponseParam = default; + if (discriminator?.Type == global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType.Static) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.StaticChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.StaticChunkingStrategyResponseParam)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.OtherChunkingStrategyResponseParam? otherResponseParam = default; + if (discriminator?.Type == global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType.Other) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.OtherChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.OtherChunkingStrategyResponseParam)}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.VectorStoreFileObjectChunkingStrategy( + discriminator?.Type, + staticResponseParam, + otherResponseParam + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.VectorStoreFileObjectChunkingStrategy value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsStaticResponseParam) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.StaticChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.StaticChunkingStrategyResponseParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.StaticResponseParam, typeInfo); + } + else if (value.IsOtherResponseParam) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.OtherChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.OtherChunkingStrategyResponseParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OtherResponseParam, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.VectorStoreFileObjectChunkingStrategyDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.VectorStoreFileObjectChunkingStrategyDiscriminatorType.g.cs new file mode 100644 index 00000000..b20d8587 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.VectorStoreFileObjectChunkingStrategyDiscriminatorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class VectorStoreFileObjectChunkingStrategyDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.VectorStoreFileObjectChunkingStrategyDiscriminatorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.VectorStoreFileObjectChunkingStrategyDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..3221357a --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.VectorStoreFileObjectChunkingStrategyDiscriminatorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class VectorStoreFileObjectChunkingStrategyDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs b/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs index c9cbf63e..bbc1e939 100644 --- a/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs +++ b/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs @@ -23,6 +23,8 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.FileSearchRankingOptionsRankerNullableJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantToolsFunctionTypeJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantToolsFunctionTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantObjectToolDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantObjectToolDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantsApiResponseFormatOptionEnumJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantsApiResponseFormatOptionEnumNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ResponseFormatTextTypeJsonConverter), @@ -31,12 +33,18 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.ResponseFormatJsonObjectTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ResponseFormatJsonSchemaTypeJsonConverter), typeof(global::OpenAI.JsonConverters.ResponseFormatJsonSchemaTypeNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.ThreadStreamEventVariant1EventJsonConverter), - typeof(global::OpenAI.JsonConverters.ThreadStreamEventVariant1EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.ErrorEventEventJsonConverter), + typeof(global::OpenAI.JsonConverters.ErrorEventEventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.DoneEventEventJsonConverter), + typeof(global::OpenAI.JsonConverters.DoneEventEventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.DoneEventDataJsonConverter), + typeof(global::OpenAI.JsonConverters.DoneEventDataNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant3EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant3EventNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ThreadObjectObjectJsonConverter), typeof(global::OpenAI.JsonConverters.ThreadObjectObjectNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant1EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant1EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant4EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant4EventNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunObjectObjectJsonConverter), typeof(global::OpenAI.JsonConverters.RunObjectObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunObjectStatusJsonConverter), @@ -49,32 +57,34 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.RunObjectLastErrorCodeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunObjectIncompleteDetailsReasonJsonConverter), typeof(global::OpenAI.JsonConverters.RunObjectIncompleteDetailsReasonNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RunObjectToolDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RunObjectToolDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.TruncationObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.TruncationObjectTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantsApiToolChoiceOptionEnumJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantsApiToolChoiceOptionEnumNullableJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantsNamedToolChoiceTypeJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantsNamedToolChoiceTypeNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant2EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant2EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant3EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant3EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant4EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant4EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant5EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant5EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant6EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant6EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant7EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant7EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant8EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant8EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant9EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant9EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant10EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventVariant10EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant1EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant1EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant5EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant5EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant6EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant6EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant7EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant7EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant8EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant8EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant9EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant9EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant10EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant10EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant11EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant11EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant12EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant12EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant13EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant13EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant14EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant14EventNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepObjectObjectJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepObjectObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepObjectTypeJsonConverter), @@ -91,6 +101,8 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsCodeOutputLogsObjectTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsCodeOutputImageObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsCodeOutputImageObjectTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchObjectTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchRankingOptionsObjectRankerJsonConverter), @@ -99,12 +111,16 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchResultObjectContentItemTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsFunctionObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsFunctionObjectTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepObjectStepDetailsDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepObjectStepDetailsDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepObjectLastErrorCodeJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepObjectLastErrorCodeNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant2EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant2EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant3EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant3EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant15EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant15EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant16EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant16EventNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDeltaObjectObjectJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDeltaObjectObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsMessageCreationObjectTypeJsonConverter), @@ -117,20 +133,26 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsFileSearchObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsFileSearchObjectTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsFunctionObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsFunctionObjectTypeNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant4EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant4EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant5EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant5EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant6EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant6EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant7EventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant7EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant1EventJsonConverter), - typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant1EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant17EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant17EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant18EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant18EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant19EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant19EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant20EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant20EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant21EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant21EventNullableJsonConverter), typeof(global::OpenAI.JsonConverters.MessageObjectObjectJsonConverter), typeof(global::OpenAI.JsonConverters.MessageObjectObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.MessageObjectStatusJsonConverter), @@ -153,14 +175,20 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.MessageContentTextAnnotationsFileCitationObjectTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.MessageContentTextAnnotationsFilePathObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.MessageContentTextAnnotationsFilePathObjectTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.MessageContentTextObjectTextAnnotationDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.MessageContentTextObjectTextAnnotationDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.MessageContentRefusalObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.MessageContentRefusalObjectTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.MessageObjectContentItemDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.MessageObjectContentItemDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantToolsFileSearchTypeOnlyTypeJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantToolsFileSearchTypeOnlyTypeNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant2EventJsonConverter), - typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant2EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant3EventJsonConverter), - typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant3EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.MessageObjectAttachmentToolDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.MessageObjectAttachmentToolDiscriminatorTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant22EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant22EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant23EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant23EventNullableJsonConverter), typeof(global::OpenAI.JsonConverters.MessageDeltaObjectObjectJsonConverter), typeof(global::OpenAI.JsonConverters.MessageDeltaObjectObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.MessageDeltaObjectDeltaRoleJsonConverter), @@ -175,22 +203,22 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.MessageDeltaContentTextAnnotationsFileCitationObjectTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.MessageDeltaContentTextAnnotationsFilePathObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.MessageDeltaContentTextAnnotationsFilePathObjectTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.MessageDeltaContentRefusalObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.MessageDeltaContentRefusalObjectTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectImageUrlDetailJsonConverter), typeof(global::OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectImageUrlDetailNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant4EventJsonConverter), - typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant4EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant5EventJsonConverter), - typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant5EventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.ErrorEventEventJsonConverter), - typeof(global::OpenAI.JsonConverters.ErrorEventEventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.DoneEventEventJsonConverter), - typeof(global::OpenAI.JsonConverters.DoneEventEventNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.DoneEventDataJsonConverter), - typeof(global::OpenAI.JsonConverters.DoneEventDataNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.MessageDeltaObjectDeltaContentItemDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.MessageDeltaObjectDeltaContentItemDiscriminatorTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant24EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant24EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant25EventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant25EventNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventDiscriminatorEventJsonConverter), + typeof(global::OpenAI.JsonConverters.AssistantStreamEventDiscriminatorEventNullableJsonConverter), typeof(global::OpenAI.JsonConverters.AudioResponseFormatJsonConverter), typeof(global::OpenAI.JsonConverters.AudioResponseFormatNullableJsonConverter), typeof(global::OpenAI.JsonConverters.AuditLogEventTypeJsonConverter), @@ -219,6 +247,8 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartTextTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartRefusalTypeJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartRefusalTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageRoleJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageRoleNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestFunctionMessageRoleJsonConverter), @@ -233,10 +263,14 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartAudioTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartAudioInputAudioFormatJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartAudioInputAudioFormatNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.ChatCompletionRequestUserMessageContentPartDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.ChatCompletionRequestUserMessageContentPartDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestUserMessageRoleJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestUserMessageRoleNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestToolMessageRoleJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestToolMessageRoleNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.ChatCompletionRequestMessageDiscriminatorRoleJsonConverter), + typeof(global::OpenAI.JsonConverters.ChatCompletionRequestMessageDiscriminatorRoleNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionResponseMessageRoleJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionResponseMessageRoleNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRoleJsonConverter), @@ -249,12 +283,18 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.ChatCompletionToolChoiceOptionEnumNullableJsonConverter), typeof(global::OpenAI.JsonConverters.StaticChunkingStrategyRequestParamTypeJsonConverter), typeof(global::OpenAI.JsonConverters.StaticChunkingStrategyRequestParamTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.ChunkingStrategyRequestParamDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.ChunkingStrategyRequestParamDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateAssistantRequestModelJsonConverter), typeof(global::OpenAI.JsonConverters.CreateAssistantRequestModelNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeJsonConverter), typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeJsonConverter), typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateChatCompletionFunctionResponseChoiceFinishReasonJsonConverter), typeof(global::OpenAI.JsonConverters.CreateChatCompletionFunctionResponseChoiceFinishReasonNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateChatCompletionFunctionResponseObjectJsonConverter), @@ -265,6 +305,8 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.CreateChatCompletionRequestAudioVoiceNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateChatCompletionRequestAudioFormatJsonConverter), typeof(global::OpenAI.JsonConverters.CreateChatCompletionRequestAudioFormatNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateChatCompletionRequestResponseFormatDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateChatCompletionRequestResponseFormatDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateChatCompletionRequestServiceTierJsonConverter), typeof(global::OpenAI.JsonConverters.CreateChatCompletionRequestServiceTierNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateChatCompletionRequestFunctionCallJsonConverter), @@ -333,10 +375,16 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.CreateMessageRequestRoleNullableJsonConverter), typeof(global::OpenAI.JsonConverters.MessageRequestContentTextObjectTypeJsonConverter), typeof(global::OpenAI.JsonConverters.MessageRequestContentTextObjectTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateMessageRequestContentVariant2ItemDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateMessageRequestContentVariant2ItemDiscriminatorTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateMessageRequestAttachmentToolDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateMessageRequestAttachmentToolDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant1TypeJsonConverter), typeof(global::OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant1TypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant2TypeJsonConverter), typeof(global::OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant2TypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateModerationRequestModelJsonConverter), typeof(global::OpenAI.JsonConverters.CreateModerationRequestModelNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHateItemJsonConverter), @@ -367,6 +415,8 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesViolenceGraphicItemNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateRunRequestModelJsonConverter), typeof(global::OpenAI.JsonConverters.CreateRunRequestModelNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateRunRequestToolDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateRunRequestToolDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateSpeechRequestModelJsonConverter), typeof(global::OpenAI.JsonConverters.CreateSpeechRequestModelNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateSpeechRequestVoiceJsonConverter), @@ -377,8 +427,12 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeJsonConverter), typeof(global::OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateThreadAndRunRequestModelJsonConverter), typeof(global::OpenAI.JsonConverters.CreateThreadAndRunRequestModelNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateThreadAndRunRequestToolDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateThreadAndRunRequestToolDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateTranscriptionRequestModelJsonConverter), typeof(global::OpenAI.JsonConverters.CreateTranscriptionRequestModelNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateTranscriptionRequestTimestampGranularitieJsonConverter), @@ -389,6 +443,8 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.CreateUploadRequestPurposeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.VectorStoreExpirationAfterAnchorJsonConverter), typeof(global::OpenAI.JsonConverters.VectorStoreExpirationAfterAnchorNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.DeleteAssistantResponseObjectJsonConverter), typeof(global::OpenAI.JsonConverters.DeleteAssistantResponseObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.DeleteFileResponseObjectJsonConverter), @@ -459,10 +515,14 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.StaticChunkingStrategyResponseParamTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.OtherChunkingStrategyResponseParamTypeJsonConverter), typeof(global::OpenAI.JsonConverters.OtherChunkingStrategyResponseParamTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.VectorStoreFileObjectChunkingStrategyDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.VectorStoreFileObjectChunkingStrategyDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.VectorStoreObjectObjectJsonConverter), typeof(global::OpenAI.JsonConverters.VectorStoreObjectObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.VectorStoreObjectStatusJsonConverter), typeof(global::OpenAI.JsonConverters.VectorStoreObjectStatusNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.ModifyAssistantRequestToolDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.ModifyAssistantRequestToolDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ProjectObjectJsonConverter), typeof(global::OpenAI.JsonConverters.ProjectObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ProjectStatusJsonConverter), @@ -645,6 +705,8 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.RealtimeRateLimitsUpdatedTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeRateLimitsUpdatedRateLimitNameJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeRateLimitsUpdatedRateLimitNameNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventDiscriminatorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventDiscriminatorTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateBatchRequestEndpointJsonConverter), typeof(global::OpenAI.JsonConverters.CreateBatchRequestEndpointNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateBatchRequestCompletionWindowJsonConverter), @@ -673,16 +735,23 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.ListVectorStoreFilesOrderNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ListVectorStoreFilesFilterJsonConverter), typeof(global::OpenAI.JsonConverters.ListVectorStoreFilesFilterNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory3), + typeof(global::OpenAI.JsonConverters.ToolsItemJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantsApiResponseFormatOptionJsonConverter), typeof(global::OpenAI.JsonConverters.AssistantStreamEventJsonConverter), - typeof(global::OpenAI.JsonConverters.ThreadStreamEventJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStreamEventJsonConverter), + typeof(global::OpenAI.JsonConverters.ToolsItem8JsonConverter), typeof(global::OpenAI.JsonConverters.AssistantsApiToolChoiceOptionJsonConverter), - typeof(global::OpenAI.JsonConverters.RunStepStreamEventJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepObjectStepDetailsJsonConverter), + typeof(global::OpenAI.JsonConverters.ToolCallsItem2JsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDeltaObjectDeltaStepDetailsJsonConverter), + typeof(global::OpenAI.JsonConverters.ToolCallsItemJsonConverter), + typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputJsonConverter), + typeof(global::OpenAI.JsonConverters.ContentItem2JsonConverter), + typeof(global::OpenAI.JsonConverters.AnnotationsItemJsonConverter), + typeof(global::OpenAI.JsonConverters.ToolsItem6JsonConverter), + typeof(global::OpenAI.JsonConverters.ContentItemJsonConverter), + typeof(global::OpenAI.JsonConverters.AnnotationsItem2JsonConverter), typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2), - typeof(global::OpenAI.JsonConverters.MessageStreamEventJsonConverter), - typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory4), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageContentPartJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestMessageJsonConverter), typeof(global::OpenAI.JsonConverters.ChatCompletionRequestSystemMessageContentPartJsonConverter), @@ -691,9 +760,23 @@ namespace OpenAI 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), })] diff --git a/src/libs/OpenAI/Generated/JsonSerializerContextTypes.g.cs b/src/libs/OpenAI/Generated/JsonSerializerContextTypes.g.cs index 5bf5a38d..a0675290 100644 --- a/src/libs/OpenAI/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/OpenAI/Generated/JsonSerializerContextTypes.g.cs @@ -42,11 +42,11 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.IList>? Type6 { get; set; } + public global::System.Collections.Generic.IList? Type6 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type7 { get; set; } + public global::OpenAI.ToolsItem? Type7 { get; set; } /// /// /// @@ -106,3910 +106,4190 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::OpenAI.AssistantObjectToolResources? Type22 { get; set; } + public global::OpenAI.AssistantObjectToolDiscriminator? Type22 { get; set; } /// /// /// - public global::OpenAI.AssistantObjectToolResourcesCodeInterpreter? Type23 { get; set; } + public global::OpenAI.AssistantObjectToolDiscriminatorType? Type23 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type24 { get; set; } + public global::OpenAI.AssistantObjectToolResources? Type24 { get; set; } /// /// /// - public global::OpenAI.AssistantObjectToolResourcesFileSearch? Type25 { get; set; } + public global::OpenAI.AssistantObjectToolResourcesCodeInterpreter? Type25 { get; set; } /// /// /// - public global::OpenAI.AssistantsApiResponseFormatOption? Type26 { get; set; } + public global::System.Collections.Generic.IList? Type26 { get; set; } /// /// /// - public global::OpenAI.AssistantsApiResponseFormatOptionEnum? Type27 { get; set; } + public global::OpenAI.AssistantObjectToolResourcesFileSearch? Type27 { get; set; } /// /// /// - public global::OpenAI.ResponseFormatText? Type28 { get; set; } + public global::OpenAI.AssistantsApiResponseFormatOption? Type28 { get; set; } /// /// /// - public global::OpenAI.ResponseFormatTextType? Type29 { get; set; } + public global::OpenAI.AssistantsApiResponseFormatOptionEnum? Type29 { get; set; } /// /// /// - public global::OpenAI.ResponseFormatJsonObject? Type30 { get; set; } + public global::OpenAI.ResponseFormatText? Type30 { get; set; } /// /// /// - public global::OpenAI.ResponseFormatJsonObjectType? Type31 { get; set; } + public global::OpenAI.ResponseFormatTextType? Type31 { get; set; } /// /// /// - public global::OpenAI.ResponseFormatJsonSchema? Type32 { get; set; } + public global::OpenAI.ResponseFormatJsonObject? Type32 { get; set; } /// /// /// - public global::OpenAI.ResponseFormatJsonSchemaType? Type33 { get; set; } + public global::OpenAI.ResponseFormatJsonObjectType? Type33 { get; set; } /// /// /// - public global::OpenAI.ResponseFormatJsonSchemaJsonSchema? Type34 { get; set; } + public global::OpenAI.ResponseFormatJsonSchema? Type34 { get; set; } /// /// /// - public global::OpenAI.AssistantStreamEvent? Type35 { get; set; } + public global::OpenAI.ResponseFormatJsonSchemaType? Type35 { get; set; } /// /// /// - public global::OpenAI.ThreadStreamEvent? Type36 { get; set; } + public global::OpenAI.ResponseFormatJsonSchemaJsonSchema? Type36 { get; set; } /// /// /// - public global::OpenAI.ThreadStreamEventVariant1? Type37 { get; set; } + public global::OpenAI.AssistantStreamEvent? Type37 { get; set; } /// /// /// - public global::OpenAI.ThreadStreamEventVariant1Event? Type38 { get; set; } + public global::OpenAI.ErrorEvent? Type38 { get; set; } /// /// /// - public global::OpenAI.ThreadObject? Type39 { get; set; } + public global::OpenAI.ErrorEventEvent? Type39 { get; set; } /// /// /// - public global::OpenAI.ThreadObjectObject? Type40 { get; set; } + public global::OpenAI.Error? Type40 { get; set; } /// /// /// - public global::OpenAI.ThreadObjectToolResources? Type41 { get; set; } + public global::OpenAI.DoneEvent? Type41 { get; set; } /// /// /// - public global::OpenAI.ThreadObjectToolResourcesCodeInterpreter? Type42 { get; set; } + public global::OpenAI.DoneEventEvent? Type42 { get; set; } /// /// /// - public global::OpenAI.ThreadObjectToolResourcesFileSearch? Type43 { get; set; } + public global::OpenAI.DoneEventData? Type43 { get; set; } /// /// /// - public global::OpenAI.RunStreamEvent? Type44 { get; set; } + public global::OpenAI.AssistantStreamEventVariant3? Type44 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant1? Type45 { get; set; } + public global::OpenAI.AssistantStreamEventVariant3Event? Type45 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant1Event? Type46 { get; set; } + public global::OpenAI.ThreadObject? Type46 { get; set; } /// /// /// - public global::OpenAI.RunObject? Type47 { get; set; } + public global::OpenAI.ThreadObjectObject? Type47 { get; set; } /// /// /// - public global::OpenAI.RunObjectObject? Type48 { get; set; } + public global::OpenAI.ThreadObjectToolResources? Type48 { get; set; } /// /// /// - public global::OpenAI.RunObjectStatus? Type49 { get; set; } + public global::OpenAI.ThreadObjectToolResourcesCodeInterpreter? Type49 { get; set; } /// /// /// - public global::OpenAI.RunObjectRequiredAction? Type50 { get; set; } + public global::OpenAI.ThreadObjectToolResourcesFileSearch? Type50 { get; set; } /// /// /// - public global::OpenAI.RunObjectRequiredActionType? Type51 { get; set; } + public global::OpenAI.AssistantStreamEventVariant4? Type51 { get; set; } /// /// /// - public global::OpenAI.RunObjectRequiredActionSubmitToolOutputs? Type52 { get; set; } + public global::OpenAI.AssistantStreamEventVariant4Event? Type52 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type53 { get; set; } + public global::OpenAI.RunObject? Type53 { get; set; } /// /// /// - public global::OpenAI.RunToolCallObject? Type54 { get; set; } + public global::OpenAI.RunObjectObject? Type54 { get; set; } /// /// /// - public global::OpenAI.RunToolCallObjectType? Type55 { get; set; } + public global::OpenAI.RunObjectStatus? Type55 { get; set; } /// /// /// - public global::OpenAI.RunToolCallObjectFunction? Type56 { get; set; } + public global::OpenAI.RunObjectRequiredAction? Type56 { get; set; } /// /// /// - public global::OpenAI.RunObjectLastError? Type57 { get; set; } + public global::OpenAI.RunObjectRequiredActionType? Type57 { get; set; } /// /// /// - public global::OpenAI.RunObjectLastErrorCode? Type58 { get; set; } + public global::OpenAI.RunObjectRequiredActionSubmitToolOutputs? Type58 { get; set; } /// /// /// - public global::OpenAI.RunObjectIncompleteDetails? Type59 { get; set; } + public global::System.Collections.Generic.IList? Type59 { get; set; } /// /// /// - public global::OpenAI.RunObjectIncompleteDetailsReason? Type60 { get; set; } + public global::OpenAI.RunToolCallObject? Type60 { get; set; } /// /// /// - public global::OpenAI.RunCompletionUsage? Type61 { get; set; } + public global::OpenAI.RunToolCallObjectType? Type61 { get; set; } /// /// /// - public global::OpenAI.TruncationObject? Type62 { get; set; } + public global::OpenAI.RunToolCallObjectFunction? Type62 { get; set; } /// /// /// - public global::OpenAI.TruncationObjectType? Type63 { get; set; } + public global::OpenAI.RunObjectLastError? Type63 { get; set; } /// /// /// - public global::OpenAI.AssistantsApiToolChoiceOption? Type64 { get; set; } + public global::OpenAI.RunObjectLastErrorCode? Type64 { get; set; } /// /// /// - public global::OpenAI.AssistantsApiToolChoiceOptionEnum? Type65 { get; set; } + public global::OpenAI.RunObjectIncompleteDetails? Type65 { get; set; } /// /// /// - public global::OpenAI.AssistantsNamedToolChoice? Type66 { get; set; } + public global::OpenAI.RunObjectIncompleteDetailsReason? Type66 { get; set; } /// /// /// - public global::OpenAI.AssistantsNamedToolChoiceType? Type67 { get; set; } + public global::System.Collections.Generic.IList? Type67 { get; set; } /// /// /// - public global::OpenAI.AssistantsNamedToolChoiceFunction? Type68 { get; set; } + public global::OpenAI.ToolsItem8? Type68 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant2? Type69 { get; set; } + public global::OpenAI.RunObjectToolDiscriminator? Type69 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant2Event? Type70 { get; set; } + public global::OpenAI.RunObjectToolDiscriminatorType? Type70 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant3? Type71 { get; set; } + public global::OpenAI.RunCompletionUsage? Type71 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant3Event? Type72 { get; set; } + public global::OpenAI.TruncationObject? Type72 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant4? Type73 { get; set; } + public global::OpenAI.TruncationObjectType? Type73 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant4Event? Type74 { get; set; } + public global::OpenAI.AssistantsApiToolChoiceOption? Type74 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant5? Type75 { get; set; } + public global::OpenAI.AssistantsApiToolChoiceOptionEnum? Type75 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant5Event? Type76 { get; set; } + public global::OpenAI.AssistantsNamedToolChoice? Type76 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant6? Type77 { get; set; } + public global::OpenAI.AssistantsNamedToolChoiceType? Type77 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant6Event? Type78 { get; set; } + public global::OpenAI.AssistantsNamedToolChoiceFunction? Type78 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant7? Type79 { get; set; } + public global::OpenAI.AssistantStreamEventVariant5? Type79 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant7Event? Type80 { get; set; } + public global::OpenAI.AssistantStreamEventVariant5Event? Type80 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant8? Type81 { get; set; } + public global::OpenAI.AssistantStreamEventVariant6? Type81 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant8Event? Type82 { get; set; } + public global::OpenAI.AssistantStreamEventVariant6Event? Type82 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant9? Type83 { get; set; } + public global::OpenAI.AssistantStreamEventVariant7? Type83 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant9Event? Type84 { get; set; } + public global::OpenAI.AssistantStreamEventVariant7Event? Type84 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant10? Type85 { get; set; } + public global::OpenAI.AssistantStreamEventVariant8? Type85 { get; set; } /// /// /// - public global::OpenAI.RunStreamEventVariant10Event? Type86 { get; set; } + public global::OpenAI.AssistantStreamEventVariant8Event? Type86 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEvent? Type87 { get; set; } + public global::OpenAI.AssistantStreamEventVariant9? Type87 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant1? Type88 { get; set; } + public global::OpenAI.AssistantStreamEventVariant9Event? Type88 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant1Event? Type89 { get; set; } + public global::OpenAI.AssistantStreamEventVariant10? Type89 { get; set; } /// /// /// - public global::OpenAI.RunStepObject? Type90 { get; set; } + public global::OpenAI.AssistantStreamEventVariant10Event? Type90 { get; set; } /// /// /// - public global::OpenAI.RunStepObjectObject? Type91 { get; set; } + public global::OpenAI.AssistantStreamEventVariant11? Type91 { get; set; } /// /// /// - public global::OpenAI.RunStepObjectType? Type92 { get; set; } + public global::OpenAI.AssistantStreamEventVariant11Event? Type92 { get; set; } /// /// /// - public global::OpenAI.RunStepObjectStatus? Type93 { get; set; } + public global::OpenAI.AssistantStreamEventVariant12? Type93 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type94 { get; set; } + public global::OpenAI.AssistantStreamEventVariant12Event? Type94 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsMessageCreationObject? Type95 { get; set; } + public global::OpenAI.AssistantStreamEventVariant13? Type95 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsMessageCreationObjectType? Type96 { get; set; } + public global::OpenAI.AssistantStreamEventVariant13Event? Type96 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsMessageCreationObjectMessageCreation? Type97 { get; set; } + public global::OpenAI.AssistantStreamEventVariant14? Type97 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsObject? Type98 { get; set; } + public global::OpenAI.AssistantStreamEventVariant14Event? Type98 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsObjectType? Type99 { get; set; } + public global::OpenAI.RunStepObject? Type99 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type100 { get; set; } + public global::OpenAI.RunStepObjectObject? Type100 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type101 { get; set; } + public global::OpenAI.RunStepObjectType? Type101 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsCodeObject? Type102 { get; set; } + public global::OpenAI.RunStepObjectStatus? Type102 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsCodeObjectType? Type103 { get; set; } + public global::OpenAI.RunStepObjectStepDetails? Type103 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreter? Type104 { get; set; } + public global::OpenAI.RunStepDetailsMessageCreationObject? Type104 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type105 { get; set; } + public global::OpenAI.RunStepDetailsMessageCreationObjectType? Type105 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type106 { get; set; } + public global::OpenAI.RunStepDetailsMessageCreationObjectMessageCreation? Type106 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? Type107 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsObject? Type107 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObjectType? Type108 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsObjectType? Type108 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? Type109 { get; set; } + public global::System.Collections.Generic.IList? Type109 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObjectType? Type110 { get; set; } + public global::OpenAI.ToolCallsItem2? Type110 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObjectImage? Type111 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsCodeObject? Type111 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsFileSearchObject? Type112 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsCodeObjectType? Type112 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsFileSearchObjectType? Type113 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreter? Type113 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsFileSearchObjectFileSearch? Type114 { get; set; } + public global::System.Collections.Generic.IList? Type114 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject? Type115 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput? Type115 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker? Type116 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? Type116 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type117 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObjectType? Type117 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsFileSearchResultObject? Type118 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? Type118 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type119 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObjectType? Type119 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsFileSearchResultObjectContentItem? Type120 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObjectImage? Type120 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsFileSearchResultObjectContentItemType? Type121 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? Type121 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsFunctionObject? Type122 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? Type122 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsFunctionObjectType? Type123 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsFileSearchObject? Type123 { get; set; } /// /// /// - public global::OpenAI.RunStepDetailsToolCallsFunctionObjectFunction? Type124 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsFileSearchObjectType? Type124 { get; set; } /// /// /// - public global::OpenAI.RunStepObjectLastError? Type125 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsFileSearchObjectFileSearch? Type125 { get; set; } /// /// /// - public global::OpenAI.RunStepObjectLastErrorCode? Type126 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject? Type126 { get; set; } /// /// /// - public global::OpenAI.RunStepCompletionUsage? Type127 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker? Type127 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant2? Type128 { get; set; } + public global::System.Collections.Generic.IList? Type128 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant2Event? Type129 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsFileSearchResultObject? Type129 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant3? Type130 { get; set; } + public global::System.Collections.Generic.IList? Type130 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant3Event? Type131 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsFileSearchResultObjectContentItem? Type131 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaObject? Type132 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsFileSearchResultObjectContentItemType? Type132 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaObjectObject? Type133 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsFunctionObject? Type133 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaObjectDelta? Type134 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsFunctionObjectType? Type134 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type135 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsFunctionObjectFunction? Type135 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject? Type136 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminator? Type136 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsMessageCreationObjectType? Type137 { get; set; } + public global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType? Type137 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsMessageCreationObjectMessageCreation? Type138 { get; set; } + public global::OpenAI.RunStepObjectStepDetailsDiscriminator? Type138 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsObject? Type139 { get; set; } + public global::OpenAI.RunStepObjectStepDetailsDiscriminatorType? Type139 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectType? Type140 { get; set; } + public global::OpenAI.RunStepObjectLastError? Type140 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type141 { get; set; } + public global::OpenAI.RunStepObjectLastErrorCode? Type141 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type142 { get; set; } + public global::OpenAI.RunStepCompletionUsage? Type142 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? Type143 { get; set; } + public global::OpenAI.AssistantStreamEventVariant15? Type143 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectType? Type144 { get; set; } + public global::OpenAI.AssistantStreamEventVariant15Event? Type144 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter? Type145 { get; set; } + public global::OpenAI.AssistantStreamEventVariant16? Type145 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type146 { get; set; } + public global::OpenAI.AssistantStreamEventVariant16Event? Type146 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type147 { get; set; } + public global::OpenAI.RunStepDeltaObject? Type147 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? Type148 { get; set; } + public global::OpenAI.RunStepDeltaObjectObject? Type148 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType? Type149 { get; set; } + public global::OpenAI.RunStepDeltaObjectDelta? Type149 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? Type150 { get; set; } + public global::OpenAI.RunStepDeltaObjectDeltaStepDetails? Type150 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType? Type151 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject? Type151 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage? Type152 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsMessageCreationObjectType? Type152 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? Type153 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsMessageCreationObjectMessageCreation? Type153 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObjectType? Type154 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsObject? Type154 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? Type155 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectType? Type155 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectType? Type156 { get; set; } + public global::System.Collections.Generic.IList? Type156 { get; set; } /// /// /// - public global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction? Type157 { get; set; } + public global::OpenAI.ToolCallsItem? Type157 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant4? Type158 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? Type158 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant4Event? Type159 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectType? Type159 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant5? Type160 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter? Type160 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant5Event? Type161 { get; set; } + public global::System.Collections.Generic.IList? Type161 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant6? Type162 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput? Type162 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant6Event? Type163 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? Type163 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant7? Type164 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType? Type164 { get; set; } /// /// /// - public global::OpenAI.RunStepStreamEventVariant7Event? Type165 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? Type165 { get; set; } /// /// /// - public global::OpenAI.MessageStreamEvent? Type166 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType? Type166 { get; set; } /// /// /// - public global::OpenAI.MessageStreamEventVariant1? Type167 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage? Type167 { get; set; } /// /// /// - public global::OpenAI.MessageStreamEventVariant1Event? Type168 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? Type168 { get; set; } /// /// /// - public global::OpenAI.MessageObject? Type169 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? Type169 { get; set; } /// /// /// - public global::OpenAI.MessageObjectObject? Type170 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? Type170 { get; set; } /// /// /// - public global::OpenAI.MessageObjectStatus? Type171 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObjectType? Type171 { get; set; } /// /// /// - public global::OpenAI.MessageObjectIncompleteDetails? Type172 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? Type172 { get; set; } /// /// /// - public global::OpenAI.MessageObjectIncompleteDetailsReason? Type173 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectType? Type173 { get; set; } /// /// /// - public global::OpenAI.MessageObjectRole? Type174 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction? Type174 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type175 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator? Type175 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type176 { get; set; } + public global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType? Type176 { get; set; } /// /// /// - public global::OpenAI.MessageContentImageFileObject? Type177 { get; set; } + public global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator? Type177 { get; set; } /// /// /// - public global::OpenAI.MessageContentImageFileObjectType? Type178 { get; set; } + public global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType? Type178 { get; set; } /// /// /// - public global::OpenAI.MessageContentImageFileObjectImageFile? Type179 { get; set; } + public global::OpenAI.AssistantStreamEventVariant17? Type179 { get; set; } /// /// /// - public global::OpenAI.MessageContentImageFileObjectImageFileDetail? Type180 { get; set; } + public global::OpenAI.AssistantStreamEventVariant17Event? Type180 { get; set; } /// /// /// - public global::OpenAI.MessageContentImageUrlObject? Type181 { get; set; } + public global::OpenAI.AssistantStreamEventVariant18? Type181 { get; set; } /// /// /// - public global::OpenAI.MessageContentImageUrlObjectType? Type182 { get; set; } + public global::OpenAI.AssistantStreamEventVariant18Event? Type182 { get; set; } /// /// /// - public global::OpenAI.MessageContentImageUrlObjectImageUrl? Type183 { get; set; } + public global::OpenAI.AssistantStreamEventVariant19? Type183 { get; set; } /// /// /// - public global::OpenAI.MessageContentImageUrlObjectImageUrlDetail? Type184 { get; set; } + public global::OpenAI.AssistantStreamEventVariant19Event? Type184 { get; set; } /// /// /// - public global::OpenAI.MessageContentTextObject? Type185 { get; set; } + public global::OpenAI.AssistantStreamEventVariant20? Type185 { get; set; } /// /// /// - public global::OpenAI.MessageContentTextObjectType? Type186 { get; set; } + public global::OpenAI.AssistantStreamEventVariant20Event? Type186 { get; set; } /// /// /// - public global::OpenAI.MessageContentTextObjectText? Type187 { get; set; } + public global::OpenAI.AssistantStreamEventVariant21? Type187 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type188 { get; set; } + public global::OpenAI.AssistantStreamEventVariant21Event? Type188 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type189 { get; set; } + public global::OpenAI.MessageObject? Type189 { get; set; } /// /// /// - public global::OpenAI.MessageContentTextAnnotationsFileCitationObject? Type190 { get; set; } + public global::OpenAI.MessageObjectObject? Type190 { get; set; } /// /// /// - public global::OpenAI.MessageContentTextAnnotationsFileCitationObjectType? Type191 { get; set; } + public global::OpenAI.MessageObjectStatus? Type191 { get; set; } /// /// /// - public global::OpenAI.MessageContentTextAnnotationsFileCitationObjectFileCitation? Type192 { get; set; } + public global::OpenAI.MessageObjectIncompleteDetails? Type192 { get; set; } /// /// /// - public global::OpenAI.MessageContentTextAnnotationsFilePathObject? Type193 { get; set; } + public global::OpenAI.MessageObjectIncompleteDetailsReason? Type193 { get; set; } /// /// /// - public global::OpenAI.MessageContentTextAnnotationsFilePathObjectType? Type194 { get; set; } + public global::OpenAI.MessageObjectRole? Type194 { get; set; } /// /// /// - public global::OpenAI.MessageContentTextAnnotationsFilePathObjectFilePath? Type195 { get; set; } + public global::System.Collections.Generic.IList? Type195 { get; set; } /// /// /// - public global::OpenAI.MessageContentRefusalObject? Type196 { get; set; } + public global::OpenAI.ContentItem2? Type196 { get; set; } /// /// /// - public global::OpenAI.MessageContentRefusalObjectType? Type197 { get; set; } + public global::OpenAI.MessageContentImageFileObject? Type197 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type198 { get; set; } + public global::OpenAI.MessageContentImageFileObjectType? Type198 { get; set; } /// /// /// - public global::OpenAI.MessageObjectAttachment? Type199 { get; set; } + public global::OpenAI.MessageContentImageFileObjectImageFile? Type199 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type200 { get; set; } + public global::OpenAI.MessageContentImageFileObjectImageFileDetail? Type200 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type201 { get; set; } + public global::OpenAI.MessageContentImageUrlObject? Type201 { get; set; } /// /// /// - public global::OpenAI.AssistantToolsFileSearchTypeOnly? Type202 { get; set; } + public global::OpenAI.MessageContentImageUrlObjectType? Type202 { get; set; } /// /// /// - public global::OpenAI.AssistantToolsFileSearchTypeOnlyType? Type203 { get; set; } + public global::OpenAI.MessageContentImageUrlObjectImageUrl? Type203 { get; set; } /// /// /// - public global::OpenAI.MessageStreamEventVariant2? Type204 { get; set; } + public global::OpenAI.MessageContentImageUrlObjectImageUrlDetail? Type204 { get; set; } /// /// /// - public global::OpenAI.MessageStreamEventVariant2Event? Type205 { get; set; } + public global::OpenAI.MessageContentTextObject? Type205 { get; set; } /// /// /// - public global::OpenAI.MessageStreamEventVariant3? Type206 { get; set; } + public global::OpenAI.MessageContentTextObjectType? Type206 { get; set; } /// /// /// - public global::OpenAI.MessageStreamEventVariant3Event? Type207 { get; set; } + public global::OpenAI.MessageContentTextObjectText? Type207 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaObject? Type208 { get; set; } + public global::System.Collections.Generic.IList? Type208 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaObjectObject? Type209 { get; set; } + public global::OpenAI.AnnotationsItem? Type209 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaObjectDelta? Type210 { get; set; } + public global::OpenAI.MessageContentTextAnnotationsFileCitationObject? Type210 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaObjectDeltaRole? Type211 { get; set; } + public global::OpenAI.MessageContentTextAnnotationsFileCitationObjectType? Type211 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type212 { get; set; } + public global::OpenAI.MessageContentTextAnnotationsFileCitationObjectFileCitation? Type212 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type213 { get; set; } + public global::OpenAI.MessageContentTextAnnotationsFilePathObject? Type213 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentImageFileObject? Type214 { get; set; } + public global::OpenAI.MessageContentTextAnnotationsFilePathObjectType? Type214 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentImageFileObjectType? Type215 { get; set; } + public global::OpenAI.MessageContentTextAnnotationsFilePathObjectFilePath? Type215 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentImageFileObjectImageFile? Type216 { get; set; } + public global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminator? Type216 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentImageFileObjectImageFileDetail? Type217 { get; set; } + public global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType? Type217 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentTextObject? Type218 { get; set; } + public global::OpenAI.MessageContentRefusalObject? Type218 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentTextObjectType? Type219 { get; set; } + public global::OpenAI.MessageContentRefusalObjectType? Type219 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentTextObjectText? Type220 { get; set; } + public global::OpenAI.MessageObjectContentItemDiscriminator? Type220 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type221 { get; set; } + public global::OpenAI.MessageObjectContentItemDiscriminatorType? Type221 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type222 { get; set; } + public global::System.Collections.Generic.IList? Type222 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? Type223 { get; set; } + public global::OpenAI.MessageObjectAttachment? Type223 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectType? Type224 { get; set; } + public global::System.Collections.Generic.IList? Type224 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation? Type225 { get; set; } + public global::OpenAI.ToolsItem6? Type225 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? Type226 { get; set; } + public global::OpenAI.AssistantToolsFileSearchTypeOnly? Type226 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectType? Type227 { get; set; } + public global::OpenAI.AssistantToolsFileSearchTypeOnlyType? Type227 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectFilePath? Type228 { get; set; } + public global::OpenAI.MessageObjectAttachmentToolDiscriminator? Type228 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentRefusalObject? Type229 { get; set; } + public global::OpenAI.MessageObjectAttachmentToolDiscriminatorType? Type229 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentRefusalObjectType? Type230 { get; set; } + public global::OpenAI.AssistantStreamEventVariant22? Type230 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentImageUrlObject? Type231 { get; set; } + public global::OpenAI.AssistantStreamEventVariant22Event? Type231 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentImageUrlObjectType? Type232 { get; set; } + public global::OpenAI.AssistantStreamEventVariant23? Type232 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentImageUrlObjectImageUrl? Type233 { get; set; } + public global::OpenAI.AssistantStreamEventVariant23Event? Type233 { get; set; } /// /// /// - public global::OpenAI.MessageDeltaContentImageUrlObjectImageUrlDetail? Type234 { get; set; } + public global::OpenAI.MessageDeltaObject? Type234 { get; set; } /// /// /// - public global::OpenAI.MessageStreamEventVariant4? Type235 { get; set; } + public global::OpenAI.MessageDeltaObjectObject? Type235 { get; set; } /// /// /// - public global::OpenAI.MessageStreamEventVariant4Event? Type236 { get; set; } + public global::OpenAI.MessageDeltaObjectDelta? Type236 { get; set; } /// /// /// - public global::OpenAI.MessageStreamEventVariant5? Type237 { get; set; } + public global::OpenAI.MessageDeltaObjectDeltaRole? Type237 { get; set; } /// /// /// - public global::OpenAI.MessageStreamEventVariant5Event? Type238 { get; set; } + public global::System.Collections.Generic.IList? Type238 { get; set; } /// /// /// - public global::OpenAI.ErrorEvent? Type239 { get; set; } + public global::OpenAI.ContentItem? Type239 { get; set; } /// /// /// - public global::OpenAI.ErrorEventEvent? Type240 { get; set; } + public global::OpenAI.MessageDeltaContentImageFileObject? Type240 { get; set; } /// /// /// - public global::OpenAI.Error? Type241 { get; set; } + public global::OpenAI.MessageDeltaContentImageFileObjectType? Type241 { get; set; } /// /// /// - public global::OpenAI.DoneEvent? Type242 { get; set; } + public global::OpenAI.MessageDeltaContentImageFileObjectImageFile? Type242 { get; set; } /// /// /// - public global::OpenAI.DoneEventEvent? Type243 { get; set; } + public global::OpenAI.MessageDeltaContentImageFileObjectImageFileDetail? Type243 { get; set; } /// /// /// - public global::OpenAI.DoneEventData? Type244 { get; set; } + public global::OpenAI.MessageDeltaContentTextObject? Type244 { get; set; } /// /// /// - public global::OpenAI.AudioResponseFormat? Type245 { get; set; } + public global::OpenAI.MessageDeltaContentTextObjectType? Type245 { get; set; } /// /// /// - public global::OpenAI.AuditLog? Type246 { get; set; } + public global::OpenAI.MessageDeltaContentTextObjectText? Type246 { get; set; } /// /// /// - public global::OpenAI.AuditLogEventType? Type247 { get; set; } + public global::System.Collections.Generic.IList? Type247 { get; set; } /// /// /// - public global::OpenAI.AuditLogProject? Type248 { get; set; } + public global::OpenAI.AnnotationsItem2? Type248 { get; set; } /// /// /// - public global::OpenAI.AuditLogActor? Type249 { get; set; } + public global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? Type249 { get; set; } /// /// /// - public global::OpenAI.AuditLogActorType? Type250 { get; set; } + public global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectType? Type250 { get; set; } /// /// /// - public global::OpenAI.AuditLogActorSession? Type251 { get; set; } + public global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation? Type251 { get; set; } /// /// /// - public global::OpenAI.AuditLogActorUser? Type252 { get; set; } + public global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? Type252 { get; set; } /// /// /// - public global::OpenAI.AuditLogActorApiKey? Type253 { get; set; } + public global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectType? Type253 { get; set; } /// /// /// - public global::OpenAI.AuditLogActorApiKeyType? Type254 { get; set; } + public global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectFilePath? Type254 { get; set; } /// /// /// - public global::OpenAI.AuditLogActorServiceAccount? Type255 { get; set; } + public global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminator? Type255 { get; set; } /// /// /// - public global::OpenAI.AuditLogApiKeyCreated? Type256 { get; set; } + public global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType? Type256 { get; set; } /// /// /// - public global::OpenAI.AuditLogApiKeyCreatedData? Type257 { get; set; } + public global::OpenAI.MessageDeltaContentRefusalObject? Type257 { get; set; } /// /// /// - public global::OpenAI.AuditLogApiKeyUpdated? Type258 { get; set; } + public global::OpenAI.MessageDeltaContentRefusalObjectType? Type258 { get; set; } /// /// /// - public global::OpenAI.AuditLogApiKeyUpdatedChangesRequested? Type259 { get; set; } + public global::OpenAI.MessageDeltaContentImageUrlObject? Type259 { get; set; } /// /// /// - public global::OpenAI.AuditLogApiKeyDeleted? Type260 { get; set; } + public global::OpenAI.MessageDeltaContentImageUrlObjectType? Type260 { get; set; } /// /// /// - public global::OpenAI.AuditLogInviteSent? Type261 { get; set; } + public global::OpenAI.MessageDeltaContentImageUrlObjectImageUrl? Type261 { get; set; } /// /// /// - public global::OpenAI.AuditLogInviteSentData? Type262 { get; set; } + public global::OpenAI.MessageDeltaContentImageUrlObjectImageUrlDetail? Type262 { get; set; } /// /// /// - public global::OpenAI.AuditLogInviteAccepted? Type263 { get; set; } + public global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminator? Type263 { get; set; } /// /// /// - public global::OpenAI.AuditLogInviteDeleted? Type264 { get; set; } + public global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType? Type264 { get; set; } /// /// /// - public global::OpenAI.AuditLogLoginFailed? Type265 { get; set; } + public global::OpenAI.AssistantStreamEventVariant24? Type265 { get; set; } /// /// /// - public global::OpenAI.AuditLogLogoutFailed? Type266 { get; set; } + public global::OpenAI.AssistantStreamEventVariant24Event? Type266 { get; set; } /// /// /// - public global::OpenAI.AuditLogOrganizationUpdated? Type267 { get; set; } + public global::OpenAI.AssistantStreamEventVariant25? Type267 { get; set; } /// /// /// - public global::OpenAI.AuditLogOrganizationUpdatedChangesRequested? Type268 { get; set; } + public global::OpenAI.AssistantStreamEventVariant25Event? Type268 { get; set; } /// /// /// - public global::OpenAI.AuditLogOrganizationUpdatedChangesRequestedSettings? Type269 { get; set; } + public global::OpenAI.AssistantStreamEventDiscriminator? Type269 { get; set; } /// /// /// - public global::OpenAI.AuditLogProjectCreated? Type270 { get; set; } + public global::OpenAI.AssistantStreamEventDiscriminatorEvent? Type270 { get; set; } /// /// /// - public global::OpenAI.AuditLogProjectCreatedData? Type271 { get; set; } + public global::OpenAI.AudioResponseFormat? Type271 { get; set; } /// /// /// - public global::OpenAI.AuditLogProjectUpdated? Type272 { get; set; } + public global::OpenAI.AuditLog? Type272 { get; set; } /// /// /// - public global::OpenAI.AuditLogProjectUpdatedChangesRequested? Type273 { get; set; } + public global::OpenAI.AuditLogEventType? Type273 { get; set; } /// /// /// - public global::OpenAI.AuditLogProjectArchived? Type274 { get; set; } + public global::OpenAI.AuditLogProject? Type274 { get; set; } /// /// /// - public global::OpenAI.AuditLogServiceAccountCreated? Type275 { get; set; } + public global::OpenAI.AuditLogActor? Type275 { get; set; } /// /// /// - public global::OpenAI.AuditLogServiceAccountCreatedData? Type276 { get; set; } + public global::OpenAI.AuditLogActorType? Type276 { get; set; } /// /// /// - public global::OpenAI.AuditLogServiceAccountUpdated? Type277 { get; set; } + public global::OpenAI.AuditLogActorSession? Type277 { get; set; } /// /// /// - public global::OpenAI.AuditLogServiceAccountUpdatedChangesRequested? Type278 { get; set; } + public global::OpenAI.AuditLogActorUser? Type278 { get; set; } /// /// /// - public global::OpenAI.AuditLogServiceAccountDeleted? Type279 { get; set; } + public global::OpenAI.AuditLogActorApiKey? Type279 { get; set; } /// /// /// - public global::OpenAI.AuditLogUserAdded? Type280 { get; set; } + public global::OpenAI.AuditLogActorApiKeyType? Type280 { get; set; } /// /// /// - public global::OpenAI.AuditLogUserAddedData? Type281 { get; set; } + public global::OpenAI.AuditLogActorServiceAccount? Type281 { get; set; } /// /// /// - public global::OpenAI.AuditLogUserUpdated? Type282 { get; set; } + public global::OpenAI.AuditLogApiKeyCreated? Type282 { get; set; } /// /// /// - public global::OpenAI.AuditLogUserUpdatedChangesRequested? Type283 { get; set; } + public global::OpenAI.AuditLogApiKeyCreatedData? Type283 { get; set; } /// /// /// - public global::OpenAI.AuditLogUserDeleted? Type284 { get; set; } + public global::OpenAI.AuditLogApiKeyUpdated? Type284 { get; set; } /// /// /// - public global::OpenAI.AutoChunkingStrategyRequestParam? Type285 { get; set; } + public global::OpenAI.AuditLogApiKeyUpdatedChangesRequested? Type285 { get; set; } /// /// /// - public global::OpenAI.AutoChunkingStrategyRequestParamType? Type286 { get; set; } + public global::OpenAI.AuditLogApiKeyDeleted? Type286 { get; set; } /// /// /// - public global::OpenAI.Batch? Type287 { get; set; } + public global::OpenAI.AuditLogInviteSent? Type287 { get; set; } /// /// /// - public global::OpenAI.BatchObject? Type288 { get; set; } + public global::OpenAI.AuditLogInviteSentData? Type288 { get; set; } /// /// /// - public global::OpenAI.BatchErrors? Type289 { get; set; } + public global::OpenAI.AuditLogInviteAccepted? Type289 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type290 { get; set; } + public global::OpenAI.AuditLogInviteDeleted? Type290 { get; set; } /// /// /// - public global::OpenAI.BatchErrorsDataItem? Type291 { get; set; } + public global::OpenAI.AuditLogLoginFailed? Type291 { get; set; } /// /// /// - public global::OpenAI.BatchStatus? Type292 { get; set; } + public global::OpenAI.AuditLogLogoutFailed? Type292 { get; set; } /// /// /// - public global::OpenAI.BatchRequestCounts? Type293 { get; set; } + public global::OpenAI.AuditLogOrganizationUpdated? Type293 { get; set; } /// /// /// - public global::OpenAI.BatchRequestInput? Type294 { get; set; } + public global::OpenAI.AuditLogOrganizationUpdatedChangesRequested? Type294 { get; set; } /// /// /// - public global::OpenAI.BatchRequestInputMethod? Type295 { get; set; } + public global::OpenAI.AuditLogOrganizationUpdatedChangesRequestedSettings? Type295 { get; set; } /// /// /// - public global::OpenAI.BatchRequestOutput? Type296 { get; set; } + public global::OpenAI.AuditLogProjectCreated? Type296 { get; set; } /// /// /// - public global::OpenAI.BatchRequestOutputResponse? Type297 { get; set; } + public global::OpenAI.AuditLogProjectCreatedData? Type297 { get; set; } /// /// /// - public global::OpenAI.BatchRequestOutputError? Type298 { get; set; } + public global::OpenAI.AuditLogProjectUpdated? Type298 { get; set; } /// /// /// - public global::OpenAI.CancelUploadRequest? Type299 { get; set; } + public global::OpenAI.AuditLogProjectUpdatedChangesRequested? Type299 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionFunctionCallOption? Type300 { get; set; } + public global::OpenAI.AuditLogProjectArchived? Type300 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionFunctions? Type301 { get; set; } + public global::OpenAI.AuditLogServiceAccountCreated? Type301 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionMessageToolCall? Type302 { get; set; } + public global::OpenAI.AuditLogServiceAccountCreatedData? Type302 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionMessageToolCallType? Type303 { get; set; } + public global::OpenAI.AuditLogServiceAccountUpdated? Type303 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionMessageToolCallFunction? Type304 { get; set; } + public global::OpenAI.AuditLogServiceAccountUpdatedChangesRequested? Type304 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionMessageToolCallChunk? Type305 { get; set; } + public global::OpenAI.AuditLogServiceAccountDeleted? Type305 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionMessageToolCallChunkType? Type306 { get; set; } + public global::OpenAI.AuditLogUserAdded? Type306 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionMessageToolCallChunkFunction? Type307 { get; set; } + public global::OpenAI.AuditLogUserAddedData? Type307 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type308 { get; set; } + public global::OpenAI.AuditLogUserUpdated? Type308 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type309 { get; set; } + public global::OpenAI.AuditLogUserUpdatedChangesRequested? Type309 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionModalitie? Type310 { get; set; } + public global::OpenAI.AuditLogUserDeleted? Type310 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionNamedToolChoice? Type311 { get; set; } + public global::OpenAI.AutoChunkingStrategyRequestParam? Type311 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionNamedToolChoiceType? Type312 { get; set; } + public global::OpenAI.AutoChunkingStrategyRequestParamType? Type312 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionNamedToolChoiceFunction? Type313 { get; set; } + public global::OpenAI.Batch? Type313 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestAssistantMessage? Type314 { get; set; } + public global::OpenAI.BatchObject? Type314 { get; set; } /// /// /// - public global::OpenAI.OneOf>? Type315 { get; set; } + public global::OpenAI.BatchErrors? Type315 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type316 { get; set; } + public global::System.Collections.Generic.IList? Type316 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestAssistantMessageContentPart? Type317 { get; set; } + public global::OpenAI.BatchErrorsDataItem? Type317 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartText? Type318 { get; set; } + public global::OpenAI.BatchStatus? Type318 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartTextType? Type319 { get; set; } + public global::OpenAI.BatchRequestCounts? Type319 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartRefusal? Type320 { get; set; } + public global::OpenAI.BatchRequestInput? Type320 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartRefusalType? Type321 { get; set; } + public global::OpenAI.BatchRequestInputMethod? Type321 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestAssistantMessageRole? Type322 { get; set; } + public global::OpenAI.BatchRequestOutput? Type322 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestAssistantMessageAudio? Type323 { get; set; } + public global::OpenAI.BatchRequestOutputResponse? Type323 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestAssistantMessageFunctionCall? Type324 { get; set; } + public global::OpenAI.BatchRequestOutputError? Type324 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestFunctionMessage? Type325 { get; set; } + public global::OpenAI.CancelUploadRequest? Type325 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestFunctionMessageRole? Type326 { get; set; } + public global::OpenAI.ChatCompletionFunctionCallOption? Type326 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessage? Type327 { get; set; } + public global::OpenAI.ChatCompletionFunctions? Type327 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestSystemMessage? Type328 { get; set; } + public global::OpenAI.ChatCompletionMessageToolCall? Type328 { get; set; } /// /// /// - public global::OpenAI.OneOf>? Type329 { get; set; } + public global::OpenAI.ChatCompletionMessageToolCallType? Type329 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type330 { get; set; } + public global::OpenAI.ChatCompletionMessageToolCallFunction? Type330 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestSystemMessageContentPart? Type331 { get; set; } + public global::OpenAI.ChatCompletionMessageToolCallChunk? Type331 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestSystemMessageRole? Type332 { get; set; } + public global::OpenAI.ChatCompletionMessageToolCallChunkType? Type332 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestUserMessage? Type333 { get; set; } + public global::OpenAI.ChatCompletionMessageToolCallChunkFunction? Type333 { get; set; } /// /// /// - public global::OpenAI.OneOf>? Type334 { get; set; } + public global::System.Collections.Generic.IList? Type334 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type335 { get; set; } + public global::System.Collections.Generic.IList? Type335 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestUserMessageContentPart? Type336 { get; set; } + public global::OpenAI.ChatCompletionModalitie? Type336 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartImage? Type337 { get; set; } + public global::OpenAI.ChatCompletionNamedToolChoice? Type337 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartImageType? Type338 { get; set; } + public global::OpenAI.ChatCompletionNamedToolChoiceType? Type338 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartImageImageUrl? Type339 { get; set; } + public global::OpenAI.ChatCompletionNamedToolChoiceFunction? Type339 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartImageImageUrlDetail? Type340 { get; set; } + public global::OpenAI.ChatCompletionRequestAssistantMessage? Type340 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartAudio? Type341 { get; set; } + public global::OpenAI.OneOf>? Type341 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartAudioType? Type342 { get; set; } + public global::System.Collections.Generic.IList? Type342 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartAudioInputAudio? Type343 { get; set; } + public global::OpenAI.ChatCompletionRequestAssistantMessageContentPart? Type343 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestMessageContentPartAudioInputAudioFormat? Type344 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartText? Type344 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestUserMessageRole? Type345 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartTextType? Type345 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestToolMessage? Type346 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartRefusal? Type346 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestToolMessageRole? Type347 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartRefusalType? Type347 { get; set; } /// /// /// - public global::OpenAI.OneOf>? Type348 { get; set; } + public global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminator? Type348 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type349 { get; set; } + public global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType? Type349 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRequestToolMessageContentPart? Type350 { get; set; } + public global::OpenAI.ChatCompletionRequestAssistantMessageRole? Type350 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionResponseMessage? Type351 { get; set; } + public global::OpenAI.ChatCompletionRequestAssistantMessageAudio? Type351 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionResponseMessageRole? Type352 { get; set; } + public global::OpenAI.ChatCompletionRequestAssistantMessageFunctionCall? Type352 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionResponseMessageFunctionCall? Type353 { get; set; } + public global::OpenAI.ChatCompletionRequestFunctionMessage? Type353 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionResponseMessageAudio? Type354 { get; set; } + public global::OpenAI.ChatCompletionRequestFunctionMessageRole? Type354 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionRole? Type355 { get; set; } + public global::OpenAI.ChatCompletionRequestMessage? Type355 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionStreamOptions? Type356 { get; set; } + public global::OpenAI.ChatCompletionRequestSystemMessage? Type356 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionStreamResponseDelta? Type357 { get; set; } + public global::OpenAI.OneOf>? Type357 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionStreamResponseDeltaFunctionCall? Type358 { get; set; } + public global::System.Collections.Generic.IList? Type358 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type359 { get; set; } + public global::OpenAI.ChatCompletionRequestSystemMessageContentPart? Type359 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionStreamResponseDeltaRole? Type360 { get; set; } + public global::OpenAI.ChatCompletionRequestSystemMessageRole? Type360 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionTokenLogprob? Type361 { get; set; } + public global::OpenAI.ChatCompletionRequestUserMessage? Type361 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type362 { get; set; } + public global::OpenAI.OneOf>? Type362 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type363 { get; set; } + public global::System.Collections.Generic.IList? Type363 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionTokenLogprobTopLogprob? Type364 { get; set; } + public global::OpenAI.ChatCompletionRequestUserMessageContentPart? Type364 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionTool? Type365 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartImage? Type365 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionToolType? Type366 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartImageType? Type366 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionToolChoiceOption? Type367 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartImageImageUrl? Type367 { get; set; } /// /// /// - public global::OpenAI.ChatCompletionToolChoiceOptionEnum? Type368 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartImageImageUrlDetail? Type368 { get; set; } /// /// /// - public global::OpenAI.ChunkingStrategyRequestParam? Type369 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartAudio? Type369 { get; set; } /// /// /// - public global::OpenAI.StaticChunkingStrategyRequestParam? Type370 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartAudioType? Type370 { get; set; } /// /// /// - public global::OpenAI.StaticChunkingStrategyRequestParamType? Type371 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartAudioInputAudio? Type371 { get; set; } /// /// /// - public global::OpenAI.StaticChunkingStrategy? Type372 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageContentPartAudioInputAudioFormat? Type372 { get; set; } /// /// /// - public global::OpenAI.CompleteUploadRequest? Type373 { get; set; } + public global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator? Type373 { get; set; } /// /// /// - public global::OpenAI.CompletionUsage? Type374 { get; set; } + public global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType? Type374 { get; set; } /// /// /// - public global::OpenAI.CompletionUsageCompletionTokensDetails? Type375 { get; set; } + public global::OpenAI.ChatCompletionRequestUserMessageRole? Type375 { get; set; } /// /// /// - public global::OpenAI.CompletionUsagePromptTokensDetails? Type376 { get; set; } + public global::OpenAI.ChatCompletionRequestToolMessage? Type376 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequest? Type377 { get; set; } + public global::OpenAI.ChatCompletionRequestToolMessageRole? Type377 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type378 { get; set; } + public global::OpenAI.OneOf>? Type378 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestModel? Type379 { get; set; } + public global::System.Collections.Generic.IList? Type379 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResources? Type380 { get; set; } + public global::OpenAI.ChatCompletionRequestToolMessageContentPart? Type380 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesCodeInterpreter? Type381 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageDiscriminator? Type381 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearch? Type382 { get; set; } + public global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole? Type382 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type383 { get; set; } + public global::OpenAI.ChatCompletionResponseMessage? Type383 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStore? Type384 { get; set; } + public global::OpenAI.ChatCompletionResponseMessageRole? Type384 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type385 { get; set; } + public global::OpenAI.ChatCompletionResponseMessageFunctionCall? Type385 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Type386 { get; set; } + public global::OpenAI.ChatCompletionResponseMessageAudio? Type386 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? Type387 { get; set; } + public global::OpenAI.ChatCompletionRole? Type387 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Type388 { get; set; } + public global::OpenAI.ChatCompletionStreamOptions? Type388 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? Type389 { get; set; } + public global::OpenAI.ChatCompletionStreamResponseDelta? Type389 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? Type390 { get; set; } + public global::OpenAI.ChatCompletionStreamResponseDeltaFunctionCall? Type390 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionFunctionResponse? Type391 { get; set; } + public global::System.Collections.Generic.IList? Type391 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type392 { get; set; } + public global::OpenAI.ChatCompletionStreamResponseDeltaRole? Type392 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionFunctionResponseChoice? Type393 { get; set; } + public global::OpenAI.ChatCompletionTokenLogprob? Type393 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionFunctionResponseChoiceFinishReason? Type394 { get; set; } + public global::System.Collections.Generic.IList? Type394 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionFunctionResponseObject? Type395 { get; set; } + public global::System.Collections.Generic.IList? Type395 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequest? Type396 { get; set; } + public global::OpenAI.ChatCompletionTokenLogprobTopLogprob? Type396 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type397 { get; set; } + public global::OpenAI.ChatCompletionTool? Type397 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type398 { get; set; } + public global::OpenAI.ChatCompletionToolType? Type398 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestModel? Type399 { get; set; } + public global::OpenAI.ChatCompletionToolChoiceOption? Type399 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type400 { get; set; } + public global::OpenAI.ChatCompletionToolChoiceOptionEnum? Type400 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type401 { get; set; } + public global::OpenAI.ChunkingStrategyRequestParam? Type401 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestAudio? Type402 { get; set; } + public global::OpenAI.StaticChunkingStrategyRequestParam? Type402 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestAudioVoice? Type403 { get; set; } + public global::OpenAI.StaticChunkingStrategyRequestParamType? Type403 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestAudioFormat? Type404 { get; set; } + public global::OpenAI.StaticChunkingStrategy? Type404 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type405 { get; set; } + public global::OpenAI.ChunkingStrategyRequestParamDiscriminator? Type405 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestServiceTier? Type406 { get; set; } + public global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType? Type406 { get; set; } /// /// /// - public global::OpenAI.OneOf>? Type407 { get; set; } + public global::OpenAI.CompleteUploadRequest? Type407 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type408 { get; set; } + public global::OpenAI.CompletionUsage? Type408 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type409 { get; set; } + public global::OpenAI.CompletionUsageCompletionTokensDetails? Type409 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestFunctionCall? Type410 { get; set; } + public global::OpenAI.CompletionUsagePromptTokensDetails? Type410 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type411 { get; set; } + public global::OpenAI.CreateAssistantRequest? Type411 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponse? Type412 { get; set; } + public global::OpenAI.AnyOf? Type412 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type413 { get; set; } + public global::OpenAI.CreateAssistantRequestModel? Type413 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponseChoice? Type414 { get; set; } + public global::System.Collections.Generic.IList? Type414 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponseChoiceFinishReason? Type415 { get; set; } + public global::OpenAI.ToolsItem2? Type415 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponseChoiceLogprobs? Type416 { get; set; } + public global::OpenAI.CreateAssistantRequestToolDiscriminator? Type416 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type417 { get; set; } + public global::OpenAI.CreateAssistantRequestToolDiscriminatorType? Type417 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponseServiceTier? Type418 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResources? Type418 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponseObject? Type419 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesCodeInterpreter? Type419 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponse? Type420 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearch? Type420 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type421 { get; set; } + public global::System.Collections.Generic.IList? Type421 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseChoice? Type422 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStore? Type422 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseChoiceLogprobs? Type423 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy? Type423 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseChoiceFinishReason? Type424 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Type424 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseServiceTier? Type425 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? Type425 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseObject? Type426 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Type426 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseUsage? Type427 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? Type427 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionRequest? Type428 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? Type428 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type429 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? Type429 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionRequestModel? Type430 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Type430 { get; set; } /// /// /// - public global::OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? Type431 { get; set; } + public global::OpenAI.CreateChatCompletionFunctionResponse? Type431 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type432 { get; set; } + public global::System.Collections.Generic.IList? Type432 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionResponse? Type433 { get; set; } + public global::OpenAI.CreateChatCompletionFunctionResponseChoice? Type433 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type434 { get; set; } + public global::OpenAI.CreateChatCompletionFunctionResponseChoiceFinishReason? Type434 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionResponseChoice? Type435 { get; set; } + public global::OpenAI.CreateChatCompletionFunctionResponseObject? Type435 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionResponseChoiceFinishReason? Type436 { get; set; } + public global::OpenAI.CreateChatCompletionRequest? Type436 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionResponseChoiceLogprobs? Type437 { get; set; } + public global::System.Collections.Generic.IList? Type437 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type438 { get; set; } + public global::OpenAI.AnyOf? Type438 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type439 { get; set; } + public global::OpenAI.CreateChatCompletionRequestModel? Type439 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type440 { get; set; } + public global::System.Collections.Generic.Dictionary? Type440 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionResponseObject? Type441 { get; set; } + public global::System.Collections.Generic.Dictionary? Type441 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingRequest? Type442 { get; set; } + public global::OpenAI.CreateChatCompletionRequestAudio? Type442 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type443 { get; set; } + public global::OpenAI.CreateChatCompletionRequestAudioVoice? Type443 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingRequestModel? Type444 { get; set; } + public global::OpenAI.CreateChatCompletionRequestAudioFormat? Type444 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingRequestEncodingFormat? Type445 { get; set; } + public global::OpenAI.ResponseFormat? Type445 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingResponse? Type446 { get; set; } + public global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminator? Type446 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type447 { get; set; } + public global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType? Type447 { get; set; } /// /// /// - public global::OpenAI.Embedding? Type448 { get; set; } + public global::OpenAI.CreateChatCompletionRequestServiceTier? Type448 { get; set; } /// /// /// - public global::OpenAI.EmbeddingObject? Type449 { get; set; } + public global::OpenAI.OneOf>? Type449 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingResponseObject? Type450 { get; set; } + public global::System.Collections.Generic.IList? Type450 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingResponseUsage? Type451 { get; set; } + public global::OpenAI.OneOf? Type451 { get; set; } /// /// /// - public global::OpenAI.CreateFileRequest? Type452 { get; set; } + public global::OpenAI.CreateChatCompletionRequestFunctionCall? Type452 { get; set; } /// /// /// - public global::OpenAI.CreateFileRequestPurpose? Type453 { get; set; } + public global::System.Collections.Generic.IList? Type453 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequest? Type454 { get; set; } + public global::OpenAI.CreateChatCompletionResponse? Type454 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type455 { get; set; } + public global::System.Collections.Generic.IList? Type455 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestModel? Type456 { get; set; } + public global::OpenAI.CreateChatCompletionResponseChoice? Type456 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestHyperparameters? Type457 { get; set; } + public global::OpenAI.CreateChatCompletionResponseChoiceFinishReason? Type457 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type458 { get; set; } + public global::OpenAI.CreateChatCompletionResponseChoiceLogprobs? Type458 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestHyperparametersBatchSize? Type459 { get; set; } + public global::System.Collections.Generic.IList? Type459 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type460 { get; set; } + public global::OpenAI.CreateChatCompletionResponseServiceTier? Type460 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplier? Type461 { get; set; } + public global::OpenAI.CreateChatCompletionResponseObject? Type461 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type462 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponse? Type462 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestHyperparametersNEpochs? Type463 { get; set; } + public global::System.Collections.Generic.IList? Type463 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type464 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseChoice? Type464 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestIntegration? Type465 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseChoiceLogprobs? Type465 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestIntegrationType? Type466 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseChoiceFinishReason? Type466 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestIntegrationWandb? Type467 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseServiceTier? Type467 { get; set; } /// /// /// - public global::OpenAI.CreateImageEditRequest? Type468 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseObject? Type468 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type469 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseUsage? Type469 { get; set; } /// /// /// - public global::OpenAI.CreateImageEditRequestModel? Type470 { get; set; } + public global::OpenAI.CreateCompletionRequest? Type470 { get; set; } /// /// /// - public global::OpenAI.CreateImageEditRequestSize? Type471 { get; set; } + public global::OpenAI.AnyOf? Type471 { get; set; } /// /// /// - public global::OpenAI.CreateImageEditRequestResponseFormat? Type472 { get; set; } + public global::OpenAI.CreateCompletionRequestModel? Type472 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequest? Type473 { get; set; } + public global::OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? Type473 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type474 { get; set; } + public global::System.Collections.Generic.IList>? Type474 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequestModel? Type475 { get; set; } + public global::OpenAI.CreateCompletionResponse? Type475 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequestQuality? Type476 { get; set; } + public global::System.Collections.Generic.IList? Type476 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequestResponseFormat? Type477 { get; set; } + public global::OpenAI.CreateCompletionResponseChoice? Type477 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequestSize? Type478 { get; set; } + public global::OpenAI.CreateCompletionResponseChoiceFinishReason? Type478 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequestStyle? Type479 { get; set; } + public global::OpenAI.CreateCompletionResponseChoiceLogprobs? Type479 { get; set; } /// /// /// - public global::OpenAI.CreateImageVariationRequest? Type480 { get; set; } + public global::System.Collections.Generic.IList? Type480 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type481 { get; set; } + public global::System.Collections.Generic.IList>? Type481 { get; set; } /// /// /// - public global::OpenAI.CreateImageVariationRequestModel? Type482 { get; set; } + public global::System.Collections.Generic.Dictionary? Type482 { get; set; } /// /// /// - public global::OpenAI.CreateImageVariationRequestResponseFormat? Type483 { get; set; } + public global::OpenAI.CreateCompletionResponseObject? Type483 { get; set; } /// /// /// - public global::OpenAI.CreateImageVariationRequestSize? Type484 { get; set; } + public global::OpenAI.CreateEmbeddingRequest? Type484 { get; set; } /// /// /// - public global::OpenAI.CreateMessageRequest? Type485 { get; set; } + public global::OpenAI.AnyOf? Type485 { get; set; } /// /// /// - public global::OpenAI.CreateMessageRequestRole? Type486 { get; set; } + public global::OpenAI.CreateEmbeddingRequestModel? Type486 { get; set; } /// /// /// - public global::OpenAI.OneOf>>? Type487 { get; set; } + public global::OpenAI.CreateEmbeddingRequestEncodingFormat? Type487 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type488 { get; set; } + public global::OpenAI.CreateEmbeddingResponse? Type488 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type489 { get; set; } + public global::System.Collections.Generic.IList? Type489 { get; set; } /// /// /// - public global::OpenAI.MessageRequestContentTextObject? Type490 { get; set; } + public global::OpenAI.Embedding? Type490 { get; set; } /// /// /// - public global::OpenAI.MessageRequestContentTextObjectType? Type491 { get; set; } + public global::OpenAI.EmbeddingObject? Type491 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type492 { get; set; } + public global::OpenAI.CreateEmbeddingResponseObject? Type492 { get; set; } /// /// /// - public global::OpenAI.CreateMessageRequestAttachment? Type493 { get; set; } + public global::OpenAI.CreateEmbeddingResponseUsage? Type493 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequest? Type494 { get; set; } + public global::OpenAI.CreateFileRequest? Type494 { get; set; } /// /// /// - public global::OpenAI.OneOf, global::System.Collections.Generic.IList>>? Type495 { get; set; } + public global::OpenAI.CreateFileRequestPurpose? Type495 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type496 { get; set; } + public global::OpenAI.CreateFineTuningJobRequest? Type496 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type497 { get; set; } + public global::OpenAI.AnyOf? Type497 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1? Type498 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestModel? Type498 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type? Type499 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestHyperparameters? Type499 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl? Type500 { get; set; } + public global::OpenAI.OneOf? Type500 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2? Type501 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestHyperparametersBatchSize? Type501 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type? Type502 { get; set; } + public global::OpenAI.OneOf? Type502 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type503 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplier? Type503 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestModel? Type504 { get; set; } + public global::OpenAI.OneOf? Type504 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponse? Type505 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestHyperparametersNEpochs? Type505 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type506 { get; set; } + public global::System.Collections.Generic.IList? Type506 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResult? Type507 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestIntegration? Type507 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategories? Type508 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestIntegrationType? Type508 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryScores? Type509 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestIntegrationWandb? Type509 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypes? Type510 { get; set; } + public global::OpenAI.CreateImageEditRequest? Type510 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type511 { get; set; } + public global::OpenAI.AnyOf? Type511 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateItem? Type512 { get; set; } + public global::OpenAI.CreateImageEditRequestModel? Type512 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type513 { get; set; } + public global::OpenAI.CreateImageEditRequestSize? Type513 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateThreateningItem? Type514 { get; set; } + public global::OpenAI.CreateImageEditRequestResponseFormat? Type514 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type515 { get; set; } + public global::OpenAI.CreateImageRequest? Type515 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem? Type516 { get; set; } + public global::OpenAI.AnyOf? Type516 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type517 { get; set; } + public global::OpenAI.CreateImageRequestModel? Type517 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItem? Type518 { get; set; } + public global::OpenAI.CreateImageRequestQuality? Type518 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type519 { get; set; } + public global::OpenAI.CreateImageRequestResponseFormat? Type519 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitItem? Type520 { get; set; } + public global::OpenAI.CreateImageRequestSize? Type520 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type521 { get; set; } + public global::OpenAI.CreateImageRequestStyle? Type521 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitViolentItem? Type522 { get; set; } + public global::OpenAI.CreateImageVariationRequest? Type522 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type523 { get; set; } + public global::OpenAI.AnyOf? Type523 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmItem? Type524 { get; set; } + public global::OpenAI.CreateImageVariationRequestModel? Type524 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type525 { get; set; } + public global::OpenAI.CreateImageVariationRequestResponseFormat? Type525 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmIntentItem? Type526 { get; set; } + public global::OpenAI.CreateImageVariationRequestSize? Type526 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type527 { get; set; } + public global::OpenAI.CreateMessageRequest? Type527 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmInstruction? Type528 { get; set; } + public global::OpenAI.CreateMessageRequestRole? Type528 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type529 { get; set; } + public global::OpenAI.OneOf>? Type529 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualItem? Type530 { get; set; } + public global::System.Collections.Generic.IList? Type530 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type531 { get; set; } + public global::OpenAI.ContentVariant2Item? Type531 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualMinor? Type532 { get; set; } + public global::OpenAI.MessageRequestContentTextObject? Type532 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type533 { get; set; } + public global::OpenAI.MessageRequestContentTextObjectType? Type533 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceItem? Type534 { get; set; } + public global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator? Type534 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type535 { get; set; } + public global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType? Type535 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceGraphicItem? Type536 { get; set; } + public global::System.Collections.Generic.IList? Type536 { get; set; } /// /// /// - public global::OpenAI.CreateRunRequest? Type537 { get; set; } + public global::OpenAI.CreateMessageRequestAttachment? Type537 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type538 { get; set; } + public global::System.Collections.Generic.IList? Type538 { get; set; } /// /// /// - public global::OpenAI.CreateRunRequestModel? Type539 { get; set; } + public global::OpenAI.ToolsItem3? Type539 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type540 { get; set; } + public global::OpenAI.CreateMessageRequestAttachmentToolDiscriminator? Type540 { get; set; } /// /// /// - public global::OpenAI.CreateSpeechRequest? Type541 { get; set; } + public global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType? Type541 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type542 { get; set; } + public global::OpenAI.CreateModerationRequest? Type542 { get; set; } /// /// /// - public global::OpenAI.CreateSpeechRequestModel? Type543 { get; set; } + public global::OpenAI.OneOf, global::System.Collections.Generic.IList>? Type543 { get; set; } /// /// /// - public global::OpenAI.CreateSpeechRequestVoice? Type544 { get; set; } + public global::System.Collections.Generic.IList? Type544 { get; set; } /// /// /// - public global::OpenAI.CreateSpeechRequestResponseFormat? Type545 { get; set; } + public global::OpenAI.InputVariant3Item? Type545 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequest? Type546 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1? Type546 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequest? Type547 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type? Type547 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResources? Type548 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl? Type548 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesCodeInterpreter? Type549 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2? Type549 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearch? Type550 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type? Type550 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type551 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator? Type551 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStore? Type552 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType? Type552 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type553 { get; set; } + public global::OpenAI.AnyOf? Type553 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Type554 { get; set; } + public global::OpenAI.CreateModerationRequestModel? Type554 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? Type555 { get; set; } + public global::OpenAI.CreateModerationResponse? Type555 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Type556 { get; set; } + public global::System.Collections.Generic.IList? Type556 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? Type557 { get; set; } + public global::OpenAI.CreateModerationResponseResult? Type557 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? Type558 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategories? Type558 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type559 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryScores? Type559 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequestModel? Type560 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypes? Type560 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequestToolResources? Type561 { get; set; } + public global::System.Collections.Generic.IList? Type561 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequestToolResourcesCodeInterpreter? Type562 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateItem? Type562 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequestToolResourcesFileSearch? Type563 { get; set; } + public global::System.Collections.Generic.IList? Type563 { get; set; } /// /// /// - public global::OpenAI.CreateTranscriptionRequest? Type564 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateThreateningItem? Type564 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type565 { get; set; } + public global::System.Collections.Generic.IList? Type565 { get; set; } /// /// /// - public global::OpenAI.CreateTranscriptionRequestModel? Type566 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem? Type566 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type567 { get; set; } + public global::System.Collections.Generic.IList? Type567 { get; set; } /// /// /// - public global::OpenAI.CreateTranscriptionRequestTimestampGranularitie? Type568 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItem? Type568 { get; set; } /// /// /// - public global::OpenAI.CreateTranscriptionResponseJson? Type569 { get; set; } + public global::System.Collections.Generic.IList? Type569 { get; set; } /// /// /// - public global::OpenAI.CreateTranscriptionResponseVerboseJson? Type570 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitItem? Type570 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type571 { get; set; } + public global::System.Collections.Generic.IList? Type571 { get; set; } /// /// /// - public global::OpenAI.TranscriptionWord? Type572 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitViolentItem? Type572 { get; set; } /// /// /// - public float? Type573 { get; set; } + public global::System.Collections.Generic.IList? Type573 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type574 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmItem? Type574 { get; set; } /// /// /// - public global::OpenAI.TranscriptionSegment? Type575 { get; set; } + public global::System.Collections.Generic.IList? Type575 { get; set; } /// /// /// - public global::OpenAI.CreateTranslationRequest? Type576 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmIntentItem? Type576 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type577 { get; set; } + public global::System.Collections.Generic.IList? Type577 { get; set; } /// /// /// - public global::OpenAI.CreateTranslationRequestModel? Type578 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmInstruction? Type578 { get; set; } /// /// /// - public global::OpenAI.CreateTranslationResponseJson? Type579 { get; set; } + public global::System.Collections.Generic.IList? Type579 { get; set; } /// /// /// - public global::OpenAI.CreateTranslationResponseVerboseJson? Type580 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualItem? Type580 { get; set; } /// /// /// - public global::OpenAI.CreateUploadRequest? Type581 { get; set; } + public global::System.Collections.Generic.IList? Type581 { get; set; } /// /// /// - public global::OpenAI.CreateUploadRequestPurpose? Type582 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualMinor? Type582 { get; set; } /// /// /// - public global::OpenAI.CreateVectorStoreFileBatchRequest? Type583 { get; set; } + public global::System.Collections.Generic.IList? Type583 { get; set; } /// /// /// - public global::OpenAI.CreateVectorStoreFileRequest? Type584 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceItem? Type584 { get; set; } /// /// /// - public global::OpenAI.CreateVectorStoreRequest? Type585 { get; set; } + public global::System.Collections.Generic.IList? Type585 { get; set; } /// /// /// - public global::OpenAI.VectorStoreExpirationAfter? Type586 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceGraphicItem? Type586 { get; set; } /// /// /// - public global::OpenAI.VectorStoreExpirationAfterAnchor? Type587 { get; set; } + public global::OpenAI.CreateRunRequest? Type587 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type588 { get; set; } + public global::OpenAI.AnyOf? Type588 { get; set; } /// /// /// - public global::OpenAI.DefaultProjectErrorResponse? Type589 { get; set; } + public global::OpenAI.CreateRunRequestModel? Type589 { get; set; } /// /// /// - public global::OpenAI.DeleteAssistantResponse? Type590 { get; set; } + public global::System.Collections.Generic.IList? Type590 { get; set; } /// /// /// - public global::OpenAI.DeleteAssistantResponseObject? Type591 { get; set; } + public global::System.Collections.Generic.IList? Type591 { get; set; } /// /// /// - public global::OpenAI.DeleteFileResponse? Type592 { get; set; } + public global::OpenAI.ToolsItem4? Type592 { get; set; } /// /// /// - public global::OpenAI.DeleteFileResponseObject? Type593 { get; set; } + public global::OpenAI.CreateRunRequestToolDiscriminator? Type593 { get; set; } /// /// /// - public global::OpenAI.DeleteMessageResponse? Type594 { get; set; } + public global::OpenAI.CreateRunRequestToolDiscriminatorType? Type594 { get; set; } /// /// /// - public global::OpenAI.DeleteMessageResponseObject? Type595 { get; set; } + public global::OpenAI.CreateSpeechRequest? Type595 { get; set; } /// /// /// - public global::OpenAI.DeleteModelResponse? Type596 { get; set; } + public global::OpenAI.AnyOf? Type596 { get; set; } /// /// /// - public global::OpenAI.DeleteThreadResponse? Type597 { get; set; } + public global::OpenAI.CreateSpeechRequestModel? Type597 { get; set; } /// /// /// - public global::OpenAI.DeleteThreadResponseObject? Type598 { get; set; } + public global::OpenAI.CreateSpeechRequestVoice? Type598 { get; set; } /// /// /// - public global::OpenAI.DeleteVectorStoreFileResponse? Type599 { get; set; } + public global::OpenAI.CreateSpeechRequestResponseFormat? Type599 { get; set; } /// /// /// - public global::OpenAI.DeleteVectorStoreFileResponseObject? Type600 { get; set; } + public global::OpenAI.CreateThreadAndRunRequest? Type600 { get; set; } /// /// /// - public global::OpenAI.DeleteVectorStoreResponse? Type601 { get; set; } + public global::OpenAI.CreateThreadRequest? Type601 { get; set; } /// /// /// - public global::OpenAI.DeleteVectorStoreResponseObject? Type602 { get; set; } + public global::OpenAI.CreateThreadRequestToolResources? Type602 { get; set; } /// /// /// - public global::OpenAI.ErrorResponse? Type603 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesCodeInterpreter? Type603 { get; set; } /// /// /// - public global::OpenAI.FineTuneChatCompletionRequestAssistantMessage? Type604 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearch? Type604 { get; set; } /// /// /// - public global::OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? Type605 { get; set; } + public global::System.Collections.Generic.IList? Type605 { get; set; } /// /// /// - public global::OpenAI.FineTuningIntegration? Type606 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStore? Type606 { get; set; } /// /// /// - public global::OpenAI.FineTuningIntegrationType? Type607 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy? Type607 { get; set; } /// /// /// - public global::OpenAI.FineTuningIntegrationWandb? Type608 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Type608 { get; set; } /// /// /// - public global::OpenAI.FineTuningJob? Type609 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? Type609 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobError? Type610 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Type610 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobHyperparameters? Type611 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? Type611 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type612 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? Type612 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobHyperparametersNEpochs? Type613 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? Type613 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobObject? Type614 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Type614 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobStatus? Type615 { get; set; } + public global::OpenAI.AnyOf? Type615 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type616 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestModel? Type616 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type617 { get; set; } + public global::System.Collections.Generic.IList? Type617 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobCheckpoint? Type618 { get; set; } + public global::OpenAI.ToolsItem5? Type618 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobCheckpointMetrics? Type619 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestToolDiscriminator? Type619 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobCheckpointObject? Type620 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType? Type620 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobEvent? Type621 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestToolResources? Type621 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobEventLevel? Type622 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestToolResourcesCodeInterpreter? Type622 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobEventObject? Type623 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestToolResourcesFileSearch? Type623 { get; set; } /// /// /// - public global::OpenAI.FinetuneChatRequestInput? Type624 { get; set; } + public global::OpenAI.CreateTranscriptionRequest? Type624 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type625 { get; set; } + public global::OpenAI.AnyOf? Type625 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type626 { get; set; } + public global::OpenAI.CreateTranscriptionRequestModel? Type626 { get; set; } /// /// /// - public global::OpenAI.FinetuneCompletionRequestInput? Type627 { get; set; } + public global::System.Collections.Generic.IList? Type627 { get; set; } /// /// /// - public global::OpenAI.Image? Type628 { get; set; } + public global::OpenAI.CreateTranscriptionRequestTimestampGranularitie? Type628 { get; set; } /// /// /// - public global::OpenAI.ImagesResponse? Type629 { get; set; } + public global::OpenAI.CreateTranscriptionResponseJson? Type629 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type630 { get; set; } + public global::OpenAI.CreateTranscriptionResponseVerboseJson? Type630 { get; set; } /// /// /// - public global::OpenAI.Invite? Type631 { get; set; } + public global::System.Collections.Generic.IList? Type631 { get; set; } /// /// /// - public global::OpenAI.InviteObject? Type632 { get; set; } + public global::OpenAI.TranscriptionWord? Type632 { get; set; } /// /// /// - public global::OpenAI.InviteRole? Type633 { get; set; } + public float? Type633 { get; set; } /// /// /// - public global::OpenAI.InviteStatus? Type634 { get; set; } + public global::System.Collections.Generic.IList? Type634 { get; set; } /// /// /// - public global::OpenAI.InviteDeleteResponse? Type635 { get; set; } + public global::OpenAI.TranscriptionSegment? Type635 { get; set; } /// /// /// - public global::OpenAI.InviteDeleteResponseObject? Type636 { get; set; } + public global::OpenAI.CreateTranslationRequest? Type636 { get; set; } /// /// /// - public global::OpenAI.InviteListResponse? Type637 { get; set; } + public global::OpenAI.AnyOf? Type637 { get; set; } /// /// /// - public global::OpenAI.InviteListResponseObject? Type638 { get; set; } + public global::OpenAI.CreateTranslationRequestModel? Type638 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type639 { get; set; } + public global::OpenAI.CreateTranslationResponseJson? Type639 { get; set; } /// /// /// - public global::OpenAI.InviteRequest? Type640 { get; set; } + public global::OpenAI.CreateTranslationResponseVerboseJson? Type640 { get; set; } /// /// /// - public global::OpenAI.InviteRequestRole? Type641 { get; set; } + public global::OpenAI.CreateUploadRequest? Type641 { get; set; } /// /// /// - public global::OpenAI.ListAssistantsResponse? Type642 { get; set; } + public global::OpenAI.CreateUploadRequestPurpose? Type642 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type643 { get; set; } + public global::OpenAI.CreateVectorStoreFileBatchRequest? Type643 { get; set; } /// /// /// - public global::OpenAI.ListAuditLogsResponse? Type644 { get; set; } + public global::OpenAI.CreateVectorStoreFileRequest? Type644 { get; set; } /// /// /// - public global::OpenAI.ListAuditLogsResponseObject? Type645 { get; set; } + public global::OpenAI.CreateVectorStoreRequest? Type645 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type646 { get; set; } + public global::OpenAI.VectorStoreExpirationAfter? Type646 { get; set; } /// /// /// - public global::OpenAI.ListBatchesResponse? Type647 { get; set; } + public global::OpenAI.VectorStoreExpirationAfterAnchor? Type647 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type648 { get; set; } + public global::OpenAI.CreateVectorStoreRequestChunkingStrategy? Type648 { get; set; } /// /// /// - public global::OpenAI.ListBatchesResponseObject? Type649 { get; set; } + public global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminator? Type649 { get; set; } /// /// /// - public global::OpenAI.ListFilesResponse? Type650 { get; set; } + public global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType? Type650 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type651 { get; set; } + public global::OpenAI.DefaultProjectErrorResponse? Type651 { get; set; } /// /// /// - public global::OpenAI.OpenAIFile? Type652 { get; set; } + public global::OpenAI.DeleteAssistantResponse? Type652 { get; set; } /// /// /// - public global::OpenAI.OpenAIFileObject? Type653 { get; set; } + public global::OpenAI.DeleteAssistantResponseObject? Type653 { get; set; } /// /// /// - public global::OpenAI.OpenAIFilePurpose? Type654 { get; set; } + public global::OpenAI.DeleteFileResponse? Type654 { get; set; } /// /// /// - public global::OpenAI.OpenAIFileStatus? Type655 { get; set; } + public global::OpenAI.DeleteFileResponseObject? Type655 { get; set; } /// /// /// - public global::OpenAI.ListFilesResponseObject? Type656 { get; set; } + public global::OpenAI.DeleteMessageResponse? Type656 { get; set; } /// /// /// - public global::OpenAI.ListFineTuningJobCheckpointsResponse? Type657 { get; set; } + public global::OpenAI.DeleteMessageResponseObject? Type657 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type658 { get; set; } + public global::OpenAI.DeleteModelResponse? Type658 { get; set; } /// /// /// - public global::OpenAI.ListFineTuningJobCheckpointsResponseObject? Type659 { get; set; } + public global::OpenAI.DeleteThreadResponse? Type659 { get; set; } /// /// /// - public global::OpenAI.ListFineTuningJobEventsResponse? Type660 { get; set; } + public global::OpenAI.DeleteThreadResponseObject? Type660 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type661 { get; set; } + public global::OpenAI.DeleteVectorStoreFileResponse? Type661 { get; set; } /// /// /// - public global::OpenAI.ListFineTuningJobEventsResponseObject? Type662 { get; set; } + public global::OpenAI.DeleteVectorStoreFileResponseObject? Type662 { get; set; } /// /// /// - public global::OpenAI.ListMessagesResponse? Type663 { get; set; } + public global::OpenAI.DeleteVectorStoreResponse? Type663 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type664 { get; set; } + public global::OpenAI.DeleteVectorStoreResponseObject? Type664 { get; set; } /// /// /// - public global::OpenAI.ListModelsResponse? Type665 { get; set; } + public global::OpenAI.ErrorResponse? Type665 { get; set; } /// /// /// - public global::OpenAI.ListModelsResponseObject? Type666 { get; set; } + public global::OpenAI.FineTuneChatCompletionRequestAssistantMessage? Type666 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type667 { get; set; } + public global::OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? Type667 { get; set; } /// /// /// - public global::OpenAI.Model15? Type668 { get; set; } + public global::OpenAI.FineTuningIntegration? Type668 { get; set; } /// /// /// - public global::OpenAI.ModelObject? Type669 { get; set; } + public global::OpenAI.FineTuningIntegrationType? Type669 { get; set; } /// /// /// - public global::OpenAI.ListPaginatedFineTuningJobsResponse? Type670 { get; set; } + public global::OpenAI.FineTuningIntegrationWandb? Type670 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type671 { get; set; } + public global::OpenAI.FineTuningJob? Type671 { get; set; } /// /// /// - public global::OpenAI.ListPaginatedFineTuningJobsResponseObject? Type672 { get; set; } + public global::OpenAI.FineTuningJobError? Type672 { get; set; } /// /// /// - public global::OpenAI.ListRunStepsResponse? Type673 { get; set; } + public global::OpenAI.FineTuningJobHyperparameters? Type673 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type674 { get; set; } + public global::OpenAI.OneOf? Type674 { get; set; } /// /// /// - public global::OpenAI.ListRunsResponse? Type675 { get; set; } + public global::OpenAI.FineTuningJobHyperparametersNEpochs? Type675 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type676 { get; set; } + public global::OpenAI.FineTuningJobObject? Type676 { get; set; } /// /// /// - public global::OpenAI.ListThreadsResponse? Type677 { get; set; } + public global::OpenAI.FineTuningJobStatus? Type677 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type678 { get; set; } + public global::System.Collections.Generic.IList>? Type678 { get; set; } /// /// /// - public global::OpenAI.ListVectorStoreFilesResponse? Type679 { get; set; } + public global::OpenAI.OneOf? Type679 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type680 { get; set; } + public global::OpenAI.FineTuningJobCheckpoint? Type680 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObject? Type681 { get; set; } + public global::OpenAI.FineTuningJobCheckpointMetrics? Type681 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObjectObject? Type682 { get; set; } + public global::OpenAI.FineTuningJobCheckpointObject? Type682 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObjectStatus? Type683 { get; set; } + public global::OpenAI.FineTuningJobEvent? Type683 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObjectLastError? Type684 { get; set; } + public global::OpenAI.FineTuningJobEventLevel? Type684 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObjectLastErrorCode? Type685 { get; set; } + public global::OpenAI.FineTuningJobEventObject? Type685 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type686 { get; set; } + public global::OpenAI.FinetuneChatRequestInput? Type686 { get; set; } /// /// /// - public global::OpenAI.StaticChunkingStrategyResponseParam? Type687 { get; set; } + public global::System.Collections.Generic.IList>? Type687 { get; set; } /// /// /// - public global::OpenAI.StaticChunkingStrategyResponseParamType? Type688 { get; set; } + public global::OpenAI.OneOf? Type688 { get; set; } /// /// /// - public global::OpenAI.OtherChunkingStrategyResponseParam? Type689 { get; set; } + public global::OpenAI.FinetuneCompletionRequestInput? Type689 { get; set; } /// /// /// - public global::OpenAI.OtherChunkingStrategyResponseParamType? Type690 { get; set; } + public global::OpenAI.Image? Type690 { get; set; } /// /// /// - public global::OpenAI.ListVectorStoresResponse? Type691 { get; set; } + public global::OpenAI.ImagesResponse? Type691 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type692 { get; set; } + public global::System.Collections.Generic.IList? Type692 { get; set; } /// /// /// - public global::OpenAI.VectorStoreObject? Type693 { get; set; } + public global::OpenAI.Invite? Type693 { get; set; } /// /// /// - public global::OpenAI.VectorStoreObjectObject? Type694 { get; set; } + public global::OpenAI.InviteObject? Type694 { get; set; } /// /// /// - public global::OpenAI.VectorStoreObjectFileCounts? Type695 { get; set; } + public global::OpenAI.InviteRole? Type695 { get; set; } /// /// /// - public global::OpenAI.VectorStoreObjectStatus? Type696 { get; set; } + public global::OpenAI.InviteStatus? Type696 { get; set; } /// /// /// - public global::OpenAI.ModifyAssistantRequest? Type697 { get; set; } + public global::OpenAI.InviteDeleteResponse? Type697 { get; set; } /// /// /// - public global::OpenAI.ModifyAssistantRequestToolResources? Type698 { get; set; } + public global::OpenAI.InviteDeleteResponseObject? Type698 { get; set; } /// /// /// - public global::OpenAI.ModifyAssistantRequestToolResourcesCodeInterpreter? Type699 { get; set; } + public global::OpenAI.InviteListResponse? Type699 { get; set; } /// /// /// - public global::OpenAI.ModifyAssistantRequestToolResourcesFileSearch? Type700 { get; set; } + public global::OpenAI.InviteListResponseObject? Type700 { get; set; } /// /// /// - public global::OpenAI.ModifyMessageRequest? Type701 { get; set; } + public global::System.Collections.Generic.IList? Type701 { get; set; } /// /// /// - public global::OpenAI.ModifyRunRequest? Type702 { get; set; } + public global::OpenAI.InviteRequest? Type702 { get; set; } /// /// /// - public global::OpenAI.ModifyThreadRequest? Type703 { get; set; } + public global::OpenAI.InviteRequestRole? Type703 { get; set; } /// /// /// - public global::OpenAI.ModifyThreadRequestToolResources? Type704 { get; set; } + public global::OpenAI.ListAssistantsResponse? Type704 { get; set; } /// /// /// - public global::OpenAI.ModifyThreadRequestToolResourcesCodeInterpreter? Type705 { get; set; } + public global::System.Collections.Generic.IList? Type705 { get; set; } /// /// /// - public global::OpenAI.ModifyThreadRequestToolResourcesFileSearch? Type706 { get; set; } + public global::OpenAI.ListAuditLogsResponse? Type706 { get; set; } /// /// /// - public global::OpenAI.Project? Type707 { get; set; } + public global::OpenAI.ListAuditLogsResponseObject? Type707 { get; set; } /// /// /// - public global::OpenAI.ProjectObject? Type708 { get; set; } + public global::System.Collections.Generic.IList? Type708 { get; set; } /// /// /// - public global::OpenAI.ProjectStatus? Type709 { get; set; } + public global::OpenAI.ListBatchesResponse? Type709 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKey? Type710 { get; set; } + public global::System.Collections.Generic.IList? Type710 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyObject? Type711 { get; set; } + public global::OpenAI.ListBatchesResponseObject? Type711 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyOwner? Type712 { get; set; } + public global::OpenAI.ListFilesResponse? Type712 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyOwnerType? Type713 { get; set; } + public global::System.Collections.Generic.IList? Type713 { get; set; } /// /// /// - public global::OpenAI.ProjectUser? Type714 { get; set; } + public global::OpenAI.OpenAIFile? Type714 { get; set; } /// /// /// - public global::OpenAI.ProjectUserObject? Type715 { get; set; } + public global::OpenAI.OpenAIFileObject? Type715 { get; set; } /// /// /// - public global::OpenAI.ProjectUserRole? Type716 { get; set; } + public global::OpenAI.OpenAIFilePurpose? Type716 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccount? Type717 { get; set; } + public global::OpenAI.OpenAIFileStatus? Type717 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountObject? Type718 { get; set; } + public global::OpenAI.ListFilesResponseObject? Type718 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountRole? Type719 { get; set; } + public global::OpenAI.ListFineTuningJobCheckpointsResponse? Type719 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyDeleteResponse? Type720 { get; set; } + public global::System.Collections.Generic.IList? Type720 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyDeleteResponseObject? Type721 { get; set; } + public global::OpenAI.ListFineTuningJobCheckpointsResponseObject? Type721 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyListResponse? Type722 { get; set; } + public global::OpenAI.ListFineTuningJobEventsResponse? Type722 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyListResponseObject? Type723 { get; set; } + public global::System.Collections.Generic.IList? Type723 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type724 { get; set; } + public global::OpenAI.ListFineTuningJobEventsResponseObject? Type724 { get; set; } /// /// /// - public global::OpenAI.ProjectCreateRequest? Type725 { get; set; } + public global::OpenAI.ListMessagesResponse? Type725 { get; set; } /// /// /// - public global::OpenAI.ProjectListResponse? Type726 { get; set; } + public global::System.Collections.Generic.IList? Type726 { get; set; } /// /// /// - public global::OpenAI.ProjectListResponseObject? Type727 { get; set; } + public global::OpenAI.ListModelsResponse? Type727 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type728 { get; set; } + public global::OpenAI.ListModelsResponseObject? Type728 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountApiKey? Type729 { get; set; } + public global::System.Collections.Generic.IList? Type729 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountApiKeyObject? Type730 { get; set; } + public global::OpenAI.Model15? Type730 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountCreateRequest? Type731 { get; set; } + public global::OpenAI.ModelObject? Type731 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountCreateResponse? Type732 { get; set; } + public global::OpenAI.ListPaginatedFineTuningJobsResponse? Type732 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountCreateResponseObject? Type733 { get; set; } + public global::System.Collections.Generic.IList? Type733 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountCreateResponseRole? Type734 { get; set; } + public global::OpenAI.ListPaginatedFineTuningJobsResponseObject? Type734 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountDeleteResponse? Type735 { get; set; } + public global::OpenAI.ListRunStepsResponse? Type735 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountDeleteResponseObject? Type736 { get; set; } + public global::System.Collections.Generic.IList? Type736 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountListResponse? Type737 { get; set; } + public global::OpenAI.ListRunsResponse? Type737 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountListResponseObject? Type738 { get; set; } + public global::System.Collections.Generic.IList? Type738 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type739 { get; set; } + public global::OpenAI.ListThreadsResponse? Type739 { get; set; } /// /// /// - public global::OpenAI.ProjectUpdateRequest? Type740 { get; set; } + public global::System.Collections.Generic.IList? Type740 { get; set; } /// /// /// - public global::OpenAI.ProjectUserCreateRequest? Type741 { get; set; } + public global::OpenAI.ListVectorStoreFilesResponse? Type741 { get; set; } /// /// /// - public global::OpenAI.ProjectUserCreateRequestRole? Type742 { get; set; } + public global::System.Collections.Generic.IList? Type742 { get; set; } /// /// /// - public global::OpenAI.ProjectUserDeleteResponse? Type743 { get; set; } + public global::OpenAI.VectorStoreFileObject? Type743 { get; set; } /// /// /// - public global::OpenAI.ProjectUserDeleteResponseObject? Type744 { get; set; } + public global::OpenAI.VectorStoreFileObjectObject? Type744 { get; set; } /// /// /// - public global::OpenAI.ProjectUserListResponse? Type745 { get; set; } + public global::OpenAI.VectorStoreFileObjectStatus? Type745 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type746 { get; set; } + public global::OpenAI.VectorStoreFileObjectLastError? Type746 { get; set; } /// /// /// - public global::OpenAI.ProjectUserUpdateRequest? Type747 { get; set; } + public global::OpenAI.VectorStoreFileObjectLastErrorCode? Type747 { get; set; } /// /// /// - public global::OpenAI.ProjectUserUpdateRequestRole? Type748 { get; set; } + public global::OpenAI.VectorStoreFileObjectChunkingStrategy? Type748 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventConversationItemCreate? Type749 { get; set; } + public global::OpenAI.StaticChunkingStrategyResponseParam? Type749 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventConversationItemCreateItem? Type750 { get; set; } + public global::OpenAI.StaticChunkingStrategyResponseParamType? Type750 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type751 { get; set; } + public global::OpenAI.OtherChunkingStrategyResponseParam? Type751 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventConversationItemCreateItemContentItem? Type752 { get; set; } + public global::OpenAI.OtherChunkingStrategyResponseParamType? Type752 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventConversationItemDelete? Type753 { get; set; } + public global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminator? Type753 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventConversationItemTruncate? Type754 { get; set; } + public global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType? Type754 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventInputAudioBufferAppend? Type755 { get; set; } + public global::OpenAI.ListVectorStoresResponse? Type755 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventInputAudioBufferClear? Type756 { get; set; } + public global::System.Collections.Generic.IList? Type756 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventInputAudioBufferCommit? Type757 { get; set; } + public global::OpenAI.VectorStoreObject? Type757 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventResponseCancel? Type758 { get; set; } + public global::OpenAI.VectorStoreObjectObject? Type758 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventResponseCreate? Type759 { get; set; } + public global::OpenAI.VectorStoreObjectFileCounts? Type759 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventResponseCreateResponse? Type760 { get; set; } + public global::OpenAI.VectorStoreObjectStatus? Type760 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type761 { get; set; } + public global::OpenAI.ModifyAssistantRequest? Type761 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventResponseCreateResponseTool? Type762 { get; set; } + public global::System.Collections.Generic.IList? Type762 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type763 { get; set; } + public global::OpenAI.ToolsItem7? Type763 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventResponseCreateResponseMaxOutputTokens? Type764 { get; set; } + public global::OpenAI.ModifyAssistantRequestToolDiscriminator? Type764 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventSessionUpdate? Type765 { get; set; } + public global::OpenAI.ModifyAssistantRequestToolDiscriminatorType? Type765 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventSessionUpdateSession? Type766 { get; set; } + public global::OpenAI.ModifyAssistantRequestToolResources? Type766 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventSessionUpdateSessionInputAudioTranscription? Type767 { get; set; } + public global::OpenAI.ModifyAssistantRequestToolResourcesCodeInterpreter? Type767 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventSessionUpdateSessionTurnDetection? Type768 { get; set; } + public global::OpenAI.ModifyAssistantRequestToolResourcesFileSearch? Type768 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type769 { get; set; } + public global::OpenAI.ModifyMessageRequest? Type769 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventSessionUpdateSessionTool? Type770 { get; set; } + public global::OpenAI.ModifyRunRequest? Type770 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type771 { get; set; } + public global::OpenAI.ModifyThreadRequest? Type771 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokens? Type772 { get; set; } + public global::OpenAI.ModifyThreadRequestToolResources? Type772 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationCreated? Type773 { get; set; } + public global::OpenAI.ModifyThreadRequestToolResourcesCodeInterpreter? Type773 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationCreatedConversation? Type774 { get; set; } + public global::OpenAI.ModifyThreadRequestToolResourcesFileSearch? Type774 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemCreated? Type775 { get; set; } + public global::OpenAI.Project? Type775 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemCreatedItem? Type776 { get; set; } + public global::OpenAI.ProjectObject? Type776 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type777 { get; set; } + public global::OpenAI.ProjectStatus? Type777 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemCreatedItemContentItem? Type778 { get; set; } + public global::OpenAI.ProjectApiKey? Type778 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemDeleted? Type779 { get; set; } + public global::OpenAI.ProjectApiKeyObject? Type779 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted? Type780 { get; set; } + public global::OpenAI.ProjectApiKeyOwner? Type780 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed? Type781 { get; set; } + public global::OpenAI.ProjectApiKeyOwnerType? Type781 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError? Type782 { get; set; } + public global::OpenAI.ProjectUser? Type782 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemTruncated? Type783 { get; set; } + public global::OpenAI.ProjectUserObject? Type783 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventError? Type784 { get; set; } + public global::OpenAI.ProjectUserRole? Type784 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventErrorError? Type785 { get; set; } + public global::OpenAI.ProjectServiceAccount? Type785 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventInputAudioBufferCleared? Type786 { get; set; } + public global::OpenAI.ProjectServiceAccountObject? Type786 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventInputAudioBufferCommitted? Type787 { get; set; } + public global::OpenAI.ProjectServiceAccountRole? Type787 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted? Type788 { get; set; } + public global::OpenAI.ProjectApiKeyDeleteResponse? Type788 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped? Type789 { get; set; } + public global::OpenAI.ProjectApiKeyDeleteResponseObject? Type789 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventRateLimitsUpdated? Type790 { get; set; } + public global::OpenAI.ProjectApiKeyListResponse? Type790 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type791 { get; set; } + public global::OpenAI.ProjectApiKeyListResponseObject? Type791 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventRateLimitsUpdatedRateLimit? Type792 { get; set; } + public global::System.Collections.Generic.IList? Type792 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseAudioDelta? Type793 { get; set; } + public global::OpenAI.ProjectCreateRequest? Type793 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseAudioDone? Type794 { get; set; } + public global::OpenAI.ProjectListResponse? Type794 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDelta? Type795 { get; set; } + public global::OpenAI.ProjectListResponseObject? Type795 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDone? Type796 { get; set; } + public global::System.Collections.Generic.IList? Type796 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseContentPartAdded? Type797 { get; set; } + public global::OpenAI.ProjectServiceAccountApiKey? Type797 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseContentPartAddedPart? Type798 { get; set; } + public global::OpenAI.ProjectServiceAccountApiKeyObject? Type798 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseContentPartDone? Type799 { get; set; } + public global::OpenAI.ProjectServiceAccountCreateRequest? Type799 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseContentPartDonePart? Type800 { get; set; } + public global::OpenAI.ProjectServiceAccountCreateResponse? Type800 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseCreated? Type801 { get; set; } + public global::OpenAI.ProjectServiceAccountCreateResponseObject? Type801 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseCreatedResponse? Type802 { get; set; } + public global::OpenAI.ProjectServiceAccountCreateResponseRole? Type802 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type803 { get; set; } + public global::OpenAI.ProjectServiceAccountDeleteResponse? Type803 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseDone? Type804 { get; set; } + public global::OpenAI.ProjectServiceAccountDeleteResponseObject? Type804 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseDoneResponse? Type805 { get; set; } + public global::OpenAI.ProjectServiceAccountListResponse? Type805 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta? Type806 { get; set; } + public global::OpenAI.ProjectServiceAccountListResponseObject? Type806 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone? Type807 { get; set; } + public global::System.Collections.Generic.IList? Type807 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseOutputItemAdded? Type808 { get; set; } + public global::OpenAI.ProjectUpdateRequest? Type808 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseOutputItemAddedItem? Type809 { get; set; } + public global::OpenAI.ProjectUserCreateRequest? Type809 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type810 { get; set; } + public global::OpenAI.ProjectUserCreateRequestRole? Type810 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseOutputItemAddedItemContentItem? Type811 { get; set; } + public global::OpenAI.ProjectUserDeleteResponse? Type811 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseOutputItemDone? Type812 { get; set; } + public global::OpenAI.ProjectUserDeleteResponseObject? Type812 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseOutputItemDoneItem? Type813 { get; set; } + public global::OpenAI.ProjectUserListResponse? Type813 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type814 { get; set; } + public global::System.Collections.Generic.IList? Type814 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseOutputItemDoneItemContentItem? Type815 { get; set; } + public global::OpenAI.ProjectUserUpdateRequest? Type815 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseTextDelta? Type816 { get; set; } + public global::OpenAI.ProjectUserUpdateRequestRole? Type816 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseTextDone? Type817 { get; set; } + public global::OpenAI.RealtimeClientEventConversationItemCreate? Type817 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionCreated? Type818 { get; set; } + public global::OpenAI.RealtimeClientEventConversationItemCreateItem? Type818 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionCreatedSession? Type819 { get; set; } + public global::System.Collections.Generic.IList? Type819 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionCreatedSessionInputAudioTranscription? Type820 { get; set; } + public global::OpenAI.RealtimeClientEventConversationItemCreateItemContentItem? Type820 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionCreatedSessionTurnDetection? Type821 { get; set; } + public global::OpenAI.RealtimeClientEventConversationItemDelete? Type821 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type822 { get; set; } + public global::OpenAI.RealtimeClientEventConversationItemTruncate? Type822 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionCreatedSessionTool? Type823 { get; set; } + public global::OpenAI.RealtimeClientEventInputAudioBufferAppend? Type823 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type824 { get; set; } + public global::OpenAI.RealtimeClientEventInputAudioBufferClear? Type824 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionCreatedSessionMaxOutputTokens? Type825 { get; set; } + public global::OpenAI.RealtimeClientEventInputAudioBufferCommit? Type825 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionUpdated? Type826 { get; set; } + public global::OpenAI.RealtimeClientEventResponseCancel? Type826 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionUpdatedSession? Type827 { get; set; } + public global::OpenAI.RealtimeClientEventResponseCreate? Type827 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionUpdatedSessionInputAudioTranscription? Type828 { get; set; } + public global::OpenAI.RealtimeClientEventResponseCreateResponse? Type828 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionUpdatedSessionTurnDetection? Type829 { get; set; } + public global::System.Collections.Generic.IList? Type829 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type830 { get; set; } + public global::OpenAI.RealtimeClientEventResponseCreateResponseTool? Type830 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionUpdatedSessionTool? Type831 { get; set; } + public global::OpenAI.OneOf? Type831 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type832 { get; set; } + public global::OpenAI.RealtimeClientEventResponseCreateResponseMaxOutputTokens? Type832 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionUpdatedSessionMaxOutputTokens? Type833 { get; set; } + public global::OpenAI.RealtimeClientEventSessionUpdate? Type833 { get; set; } /// /// /// - public global::OpenAI.SubmitToolOutputsRunRequest? Type834 { get; set; } + public global::OpenAI.RealtimeClientEventSessionUpdateSession? Type834 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type835 { get; set; } + public global::OpenAI.RealtimeClientEventSessionUpdateSessionInputAudioTranscription? Type835 { get; set; } /// /// /// - public global::OpenAI.SubmitToolOutputsRunRequestToolOutput? Type836 { get; set; } + public global::OpenAI.RealtimeClientEventSessionUpdateSessionTurnDetection? Type836 { get; set; } /// /// /// - public global::OpenAI.UpdateVectorStoreRequest? Type837 { get; set; } + public global::System.Collections.Generic.IList? Type837 { get; set; } /// /// /// - public global::OpenAI.Upload? Type838 { get; set; } + public global::OpenAI.RealtimeClientEventSessionUpdateSessionTool? Type838 { get; set; } /// /// /// - public global::OpenAI.UploadStatus? Type839 { get; set; } + public global::OpenAI.OneOf? Type839 { get; set; } /// /// /// - public global::OpenAI.UploadObject? Type840 { get; set; } + public global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokens? Type840 { get; set; } /// /// /// - public global::OpenAI.UploadPart? Type841 { get; set; } + public global::OpenAI.RealtimeServerEventConversationCreated? Type841 { get; set; } /// /// /// - public global::OpenAI.UploadPartObject? Type842 { get; set; } + public global::OpenAI.RealtimeServerEventConversationCreatedConversation? Type842 { get; set; } /// /// /// - public global::OpenAI.User? Type843 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemCreated? Type843 { get; set; } /// /// /// - public global::OpenAI.UserObject? Type844 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemCreatedItem? Type844 { get; set; } /// /// /// - public global::OpenAI.UserRole? Type845 { get; set; } + public global::System.Collections.Generic.IList? Type845 { get; set; } /// /// /// - public global::OpenAI.UserDeleteResponse? Type846 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemCreatedItemContentItem? Type846 { get; set; } /// /// /// - public global::OpenAI.UserDeleteResponseObject? Type847 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemDeleted? Type847 { get; set; } /// /// /// - public global::OpenAI.UserListResponse? Type848 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted? Type848 { get; set; } /// /// /// - public global::OpenAI.UserListResponseObject? Type849 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed? Type849 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type850 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError? Type850 { get; set; } /// /// /// - public global::OpenAI.UserRoleUpdateRequest? Type851 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemTruncated? Type851 { get; set; } /// /// /// - public global::OpenAI.UserRoleUpdateRequestRole? Type852 { get; set; } + public global::OpenAI.RealtimeServerEventError? Type852 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileBatchObject? Type853 { get; set; } + public global::OpenAI.RealtimeServerEventErrorError? Type853 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileBatchObjectObject? Type854 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferCleared? Type854 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileBatchObjectStatus? Type855 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferCommitted? Type855 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileBatchObjectFileCounts? Type856 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted? Type856 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventType? Type857 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped? Type857 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventBase? Type858 { get; set; } + public global::OpenAI.RealtimeServerEventRateLimitsUpdated? Type858 { get; set; } /// /// /// - public global::OpenAI.RealtimeAudioFormat? Type859 { get; set; } + public global::System.Collections.Generic.IList? Type859 { get; set; } /// /// /// - public global::OpenAI.RealtimeSession? Type860 { get; set; } + public global::OpenAI.RealtimeServerEventRateLimitsUpdatedRateLimit? Type860 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionObject? Type861 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioDelta? Type861 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionVoice? Type862 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioDone? Type862 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionInputAudioTranscription? Type863 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDelta? Type863 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionTurnDetection? Type864 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDone? Type864 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionTurnDetectionType? Type865 { get; set; } + public global::OpenAI.RealtimeServerEventResponseContentPartAdded? Type865 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type866 { get; set; } + public global::OpenAI.RealtimeServerEventResponseContentPartAddedPart? Type866 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionTool? Type867 { get; set; } + public global::OpenAI.RealtimeServerEventResponseContentPartDone? Type867 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionToolChoice? Type868 { get; set; } + public global::OpenAI.RealtimeServerEventResponseContentPartDonePart? Type868 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type869 { get; set; } + public global::OpenAI.RealtimeServerEventResponseCreated? Type869 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionMaxOutputTokens? Type870 { get; set; } + public global::OpenAI.RealtimeServerEventResponseCreatedResponse? Type870 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversation? Type871 { get; set; } + public global::System.Collections.Generic.IList? Type871 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationObject? Type872 { get; set; } + public global::OpenAI.RealtimeServerEventResponseDone? Type872 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItem? Type873 { get; set; } + public global::OpenAI.RealtimeServerEventResponseDoneResponse? Type873 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemObject? Type874 { get; set; } + public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta? Type874 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemType? Type875 { get; set; } + public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone? Type875 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemStatus? Type876 { get; set; } + public global::OpenAI.RealtimeServerEventResponseOutputItemAdded? Type876 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemRole? Type877 { get; set; } + public global::OpenAI.RealtimeServerEventResponseOutputItemAddedItem? Type877 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type878 { get; set; } + public global::System.Collections.Generic.IList? Type878 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemContentItem? Type879 { get; set; } + public global::OpenAI.RealtimeServerEventResponseOutputItemAddedItemContentItem? Type879 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemContentItemType? Type880 { get; set; } + public global::OpenAI.RealtimeServerEventResponseOutputItemDone? Type880 { get; set; } /// /// /// - public global::OpenAI.RealtimeContentPart? Type881 { get; set; } + public global::OpenAI.RealtimeServerEventResponseOutputItemDoneItem? Type881 { get; set; } /// /// /// - public global::OpenAI.RealtimeContentPartType? Type882 { get; set; } + public global::System.Collections.Generic.IList? Type882 { get; set; } /// /// /// - public global::OpenAI.RealtimeErrorDetails? Type883 { get; set; } + public global::OpenAI.RealtimeServerEventResponseOutputItemDoneItemContentItem? Type883 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponse? Type884 { get; set; } + public global::OpenAI.RealtimeServerEventResponseTextDelta? Type884 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseObject? Type885 { get; set; } + public global::OpenAI.RealtimeServerEventResponseTextDone? Type885 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseStatus? Type886 { get; set; } + public global::OpenAI.RealtimeServerEventSessionCreated? Type886 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type887 { get; set; } + public global::OpenAI.RealtimeServerEventSessionCreatedSession? Type887 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseUsage? Type888 { get; set; } + public global::OpenAI.RealtimeServerEventSessionCreatedSessionInputAudioTranscription? Type888 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionUpdate? Type889 { get; set; } + public global::OpenAI.RealtimeServerEventSessionCreatedSessionTurnDetection? Type889 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionUpdateType? Type890 { get; set; } + public global::System.Collections.Generic.IList? Type890 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferAppend? Type891 { get; set; } + public global::OpenAI.RealtimeServerEventSessionCreatedSessionTool? Type891 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferAppendType? Type892 { get; set; } + public global::OpenAI.OneOf? Type892 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferCommit? Type893 { get; set; } + public global::OpenAI.RealtimeServerEventSessionCreatedSessionMaxOutputTokens? Type893 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferCommitType? Type894 { get; set; } + public global::OpenAI.RealtimeServerEventSessionUpdated? Type894 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferClear? Type895 { get; set; } + public global::OpenAI.RealtimeServerEventSessionUpdatedSession? Type895 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferClearType? Type896 { get; set; } + public global::OpenAI.RealtimeServerEventSessionUpdatedSessionInputAudioTranscription? Type896 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemCreate? Type897 { get; set; } + public global::OpenAI.RealtimeServerEventSessionUpdatedSessionTurnDetection? Type897 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemCreateType? Type898 { get; set; } + public global::System.Collections.Generic.IList? Type898 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemTruncate? Type899 { get; set; } + public global::OpenAI.RealtimeServerEventSessionUpdatedSessionTool? Type899 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemTruncateType? Type900 { get; set; } + public global::OpenAI.OneOf? Type900 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemDelete? Type901 { get; set; } + public global::OpenAI.RealtimeServerEventSessionUpdatedSessionMaxOutputTokens? Type901 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemDeleteType? Type902 { get; set; } + public global::OpenAI.SubmitToolOutputsRunRequest? Type902 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreate? Type903 { get; set; } + public global::System.Collections.Generic.IList? Type903 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateType? Type904 { get; set; } + public global::OpenAI.SubmitToolOutputsRunRequestToolOutput? Type904 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponse? Type905 { get; set; } + public global::OpenAI.UpdateVectorStoreRequest? Type905 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type906 { get; set; } + public global::OpenAI.Upload? Type906 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponseModalitie? Type907 { get; set; } + public global::OpenAI.UploadStatus? Type907 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponseVoice? Type908 { get; set; } + public global::OpenAI.UploadObject? Type908 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type909 { get; set; } + public global::OpenAI.UploadPart? Type909 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponseTool? Type910 { get; set; } + public global::OpenAI.UploadPartObject? Type910 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type911 { get; set; } + public global::OpenAI.User? Type911 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponseToolChoice? Type912 { get; set; } + public global::OpenAI.UserObject? Type912 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type913 { get; set; } + public global::OpenAI.UserRole? Type913 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponseMaxOutputTokens? Type914 { get; set; } + public global::OpenAI.UserDeleteResponse? Type914 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCancel? Type915 { get; set; } + public global::OpenAI.UserDeleteResponseObject? Type915 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCancelType? Type916 { get; set; } + public global::OpenAI.UserListResponse? Type916 { get; set; } /// /// /// - public global::OpenAI.RealtimeError? Type917 { get; set; } + public global::OpenAI.UserListResponseObject? Type917 { get; set; } /// /// /// - public global::OpenAI.RealtimeErrorType? Type918 { get; set; } + public global::System.Collections.Generic.IList? Type918 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionCreated? Type919 { get; set; } + public global::OpenAI.UserRoleUpdateRequest? Type919 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionCreatedType? Type920 { get; set; } + public global::OpenAI.UserRoleUpdateRequestRole? Type920 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionUpdated? Type921 { get; set; } + public global::OpenAI.VectorStoreFileBatchObject? Type921 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionUpdatedType? Type922 { get; set; } + public global::OpenAI.VectorStoreFileBatchObjectObject? Type922 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationCreated? Type923 { get; set; } + public global::OpenAI.VectorStoreFileBatchObjectStatus? Type923 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationCreatedType? Type924 { get; set; } + public global::OpenAI.VectorStoreFileBatchObjectFileCounts? Type924 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemCreated? Type925 { get; set; } + public global::OpenAI.RealtimeServerEventType? Type925 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemCreatedType? Type926 { get; set; } + public global::OpenAI.RealtimeServerEventBase? Type926 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? Type927 { get; set; } + public global::OpenAI.RealtimeAudioFormat? Type927 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompletedType? Type928 { get; set; } + public global::OpenAI.RealtimeSession? Type928 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? Type929 { get; set; } + public global::OpenAI.RealtimeSessionObject? Type929 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailedType? Type930 { get; set; } + public global::OpenAI.RealtimeSessionVoice? Type930 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemTruncated? Type931 { get; set; } + public global::OpenAI.RealtimeSessionInputAudioTranscription? Type931 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemTruncatedType? Type932 { get; set; } + public global::OpenAI.RealtimeSessionTurnDetection? Type932 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemDeleted? Type933 { get; set; } + public global::OpenAI.RealtimeSessionTurnDetectionType? Type933 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemDeletedType? Type934 { get; set; } + public global::System.Collections.Generic.IList? Type934 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferCommitted? Type935 { get; set; } + public global::OpenAI.RealtimeSessionTool? Type935 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferCommittedType? Type936 { get; set; } + public global::OpenAI.RealtimeSessionToolChoice? Type936 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferCleared? Type937 { get; set; } + public global::OpenAI.OneOf? Type937 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferClearedType? Type938 { get; set; } + public global::OpenAI.RealtimeSessionMaxOutputTokens? Type938 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferSpeechStarted? Type939 { get; set; } + public global::OpenAI.RealtimeConversation? Type939 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferSpeechStartedType? Type940 { get; set; } + public global::OpenAI.RealtimeConversationObject? Type940 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferSpeechStopped? Type941 { get; set; } + public global::OpenAI.RealtimeConversationItem? Type941 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferSpeechStoppedType? Type942 { get; set; } + public global::OpenAI.RealtimeConversationItemObject? Type942 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreated? Type943 { get; set; } + public global::OpenAI.RealtimeConversationItemType? Type943 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreatedType? Type944 { get; set; } + public global::OpenAI.RealtimeConversationItemStatus? Type944 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseDone? Type945 { get; set; } + public global::OpenAI.RealtimeConversationItemRole? Type945 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseDoneType? Type946 { get; set; } + public global::System.Collections.Generic.IList? Type946 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseOutputItemAdded? Type947 { get; set; } + public global::OpenAI.RealtimeConversationItemContentItem? Type947 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseOutputItemAddedType? Type948 { get; set; } + public global::OpenAI.RealtimeConversationItemContentItemType? Type948 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseOutputItemDone? Type949 { get; set; } + public global::OpenAI.RealtimeContentPart? Type949 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseOutputItemDoneType? Type950 { get; set; } + public global::OpenAI.RealtimeContentPartType? Type950 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseContentPartAdded? Type951 { get; set; } + public global::OpenAI.RealtimeErrorDetails? Type951 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseContentPartAddedType? Type952 { get; set; } + public global::OpenAI.RealtimeResponse? Type952 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseContentPartDone? Type953 { get; set; } + public global::OpenAI.RealtimeResponseObject? Type953 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseContentPartDoneType? Type954 { get; set; } + public global::OpenAI.RealtimeResponseStatus? Type954 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseTextDelta? Type955 { get; set; } + public global::System.Collections.Generic.IList? Type955 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseTextDeltaType? Type956 { get; set; } + public global::OpenAI.RealtimeResponseUsage? Type956 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseTextDone? Type957 { get; set; } + public global::OpenAI.RealtimeSessionUpdate? Type957 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseTextDoneType? Type958 { get; set; } + public global::OpenAI.RealtimeSessionUpdateType? Type958 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioTranscriptDelta? Type959 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferAppend? Type959 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioTranscriptDeltaType? Type960 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferAppendType? Type960 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioTranscriptDone? Type961 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferCommit? Type961 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioTranscriptDoneType? Type962 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferCommitType? Type962 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioDelta? Type963 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferClear? Type963 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioDeltaType? Type964 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferClearType? Type964 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioDone? Type965 { get; set; } + public global::OpenAI.RealtimeConversationItemCreate? Type965 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioDoneType? Type966 { get; set; } + public global::OpenAI.RealtimeConversationItemCreateType? Type966 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseFunctionCallArgumentsDelta? Type967 { get; set; } + public global::OpenAI.RealtimeConversationItemTruncate? Type967 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseFunctionCallArgumentsDeltaType? Type968 { get; set; } + public global::OpenAI.RealtimeConversationItemTruncateType? Type968 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseFunctionCallArgumentsDone? Type969 { get; set; } + public global::OpenAI.RealtimeConversationItemDelete? Type969 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseFunctionCallArgumentsDoneType? Type970 { get; set; } + public global::OpenAI.RealtimeConversationItemDeleteType? Type970 { get; set; } /// /// /// - public global::OpenAI.RealtimeRateLimitsUpdated? Type971 { get; set; } + public global::OpenAI.RealtimeResponseCreate? Type971 { get; set; } /// /// /// - public global::OpenAI.RealtimeRateLimitsUpdatedType? Type972 { get; set; } + public global::OpenAI.RealtimeResponseCreateType? Type972 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type973 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponse? Type973 { get; set; } /// /// /// - public global::OpenAI.RealtimeRateLimitsUpdatedRateLimit? Type974 { get; set; } + public global::System.Collections.Generic.IList? Type974 { get; set; } /// /// /// - public global::OpenAI.RealtimeRateLimitsUpdatedRateLimitName? Type975 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponseModalitie? Type975 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEvent? Type976 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponseVoice? Type976 { get; set; } /// /// /// - public global::OpenAI.CreateBatchRequest? Type977 { get; set; } + public global::System.Collections.Generic.IList? Type977 { get; set; } /// /// /// - public global::OpenAI.CreateBatchRequestEndpoint? Type978 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponseTool? Type978 { get; set; } /// /// /// - public global::OpenAI.CreateBatchRequestCompletionWindow? Type979 { get; set; } + public global::OpenAI.OneOf? Type979 { get; set; } /// /// /// - public global::OpenAI.ListAssistantsOrder? Type980 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponseToolChoice? Type980 { get; set; } /// /// /// - public global::OpenAI.ListAuditLogsEffectiveAt? Type981 { get; set; } + public global::OpenAI.OneOf? Type981 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type982 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponseMaxOutputTokens? Type982 { get; set; } /// /// /// - public global::OpenAI.ListMessagesOrder? Type983 { get; set; } + public global::OpenAI.RealtimeResponseCancel? Type983 { get; set; } /// /// /// - public global::OpenAI.ListRunsOrder? Type984 { get; set; } + public global::OpenAI.RealtimeResponseCancelType? Type984 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type985 { get; set; } + public global::OpenAI.RealtimeError? Type985 { get; set; } /// /// /// - public global::OpenAI.CreateRunIncludeItem? Type986 { get; set; } + public global::OpenAI.RealtimeErrorType? Type986 { get; set; } /// /// /// - public global::OpenAI.ListRunStepsOrder? Type987 { get; set; } + public global::OpenAI.RealtimeSessionCreated? Type987 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type988 { get; set; } + public global::OpenAI.RealtimeSessionCreatedType? Type988 { get; set; } /// /// /// - public global::OpenAI.ListRunStepsIncludeItem? Type989 { get; set; } + public global::OpenAI.RealtimeSessionUpdated? Type989 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type990 { get; set; } + public global::OpenAI.RealtimeSessionUpdatedType? Type990 { get; set; } /// /// /// - public global::OpenAI.GetRunStepIncludeItem? Type991 { get; set; } + public global::OpenAI.RealtimeConversationCreated? Type991 { get; set; } /// /// /// - public global::OpenAI.ListVectorStoresOrder? Type992 { get; set; } + public global::OpenAI.RealtimeConversationCreatedType? Type992 { get; set; } /// /// /// - public global::OpenAI.ListFilesInVectorStoreBatchOrder? Type993 { get; set; } + public global::OpenAI.RealtimeConversationItemCreated? Type993 { get; set; } /// /// /// - public global::OpenAI.ListFilesInVectorStoreBatchFilter? Type994 { get; set; } + public global::OpenAI.RealtimeConversationItemCreatedType? Type994 { get; set; } /// /// /// - public global::OpenAI.ListVectorStoreFilesOrder? Type995 { get; set; } + public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? Type995 { get; set; } /// /// /// - public global::OpenAI.ListVectorStoreFilesFilter? Type996 { get; set; } + public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompletedType? Type996 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type997 { get; set; } + public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? Type997 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type998 { get; set; } + public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailedType? Type998 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeConversationItemTruncated? Type999 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeConversationItemTruncatedType? Type1000 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeConversationItemDeleted? Type1001 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeConversationItemDeletedType? Type1002 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferCommitted? Type1003 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferCommittedType? Type1004 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferCleared? Type1005 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferClearedType? Type1006 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferSpeechStarted? Type1007 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferSpeechStartedType? Type1008 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferSpeechStopped? Type1009 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferSpeechStoppedType? Type1010 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseCreated? Type1011 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseCreatedType? Type1012 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseDone? Type1013 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseDoneType? Type1014 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseOutputItemAdded? Type1015 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseOutputItemAddedType? Type1016 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseOutputItemDone? Type1017 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseOutputItemDoneType? Type1018 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseContentPartAdded? Type1019 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseContentPartAddedType? Type1020 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseContentPartDone? Type1021 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseContentPartDoneType? Type1022 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseTextDelta? Type1023 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseTextDeltaType? Type1024 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseTextDone? Type1025 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseTextDoneType? Type1026 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioTranscriptDelta? Type1027 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioTranscriptDeltaType? Type1028 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioTranscriptDone? Type1029 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioTranscriptDoneType? Type1030 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioDelta? Type1031 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioDeltaType? Type1032 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioDone? Type1033 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioDoneType? Type1034 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseFunctionCallArgumentsDelta? Type1035 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseFunctionCallArgumentsDeltaType? Type1036 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseFunctionCallArgumentsDone? Type1037 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseFunctionCallArgumentsDoneType? Type1038 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeRateLimitsUpdated? Type1039 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeRateLimitsUpdatedType? Type1040 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1041 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeRateLimitsUpdatedRateLimit? Type1042 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeRateLimitsUpdatedRateLimitName? Type1043 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeServerEvent? Type1044 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeServerEventDiscriminator? Type1045 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeServerEventDiscriminatorType? Type1046 { get; set; } + /// + /// + /// + public global::OpenAI.CreateBatchRequest? Type1047 { get; set; } + /// + /// + /// + public global::OpenAI.CreateBatchRequestEndpoint? Type1048 { get; set; } + /// + /// + /// + public global::OpenAI.CreateBatchRequestCompletionWindow? Type1049 { get; set; } + /// + /// + /// + public global::OpenAI.ListAssistantsOrder? Type1050 { get; set; } + /// + /// + /// + public global::OpenAI.ListAuditLogsEffectiveAt? Type1051 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1052 { get; set; } + /// + /// + /// + public global::OpenAI.ListMessagesOrder? Type1053 { get; set; } + /// + /// + /// + public global::OpenAI.ListRunsOrder? Type1054 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1055 { get; set; } + /// + /// + /// + public global::OpenAI.CreateRunIncludeItem? Type1056 { get; set; } + /// + /// + /// + public global::OpenAI.ListRunStepsOrder? Type1057 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1058 { get; set; } + /// + /// + /// + public global::OpenAI.ListRunStepsIncludeItem? Type1059 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1060 { get; set; } + /// + /// + /// + public global::OpenAI.GetRunStepIncludeItem? Type1061 { get; set; } + /// + /// + /// + public global::OpenAI.ListVectorStoresOrder? Type1062 { get; set; } + /// + /// + /// + public global::OpenAI.ListFilesInVectorStoreBatchOrder? Type1063 { get; set; } + /// + /// + /// + public global::OpenAI.ListFilesInVectorStoreBatchFilter? Type1064 { get; set; } + /// + /// + /// + public global::OpenAI.ListVectorStoreFilesOrder? Type1065 { get; set; } + /// + /// + /// + public global::OpenAI.ListVectorStoreFilesFilter? Type1066 { get; set; } + /// + /// + /// + public global::OpenAI.OneOf? Type1067 { get; set; } + /// + /// + /// + public global::OpenAI.OneOf? Type1068 { get; set; } } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs index 53f2e7f4..2cac6a1b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs @@ -163,7 +163,7 @@ partial void ProcessCreateAssistantResponseContent( string? name = default, string? description = default, string? instructions = default, - global::System.Collections.Generic.IList>? tools = default, + global::System.Collections.Generic.IList? tools = default, global::OpenAI.CreateAssistantRequestToolResources? toolResources = default, object? metadata = default, double? temperature = 1, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs index 4e9f69ed..70b5f9e3 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs @@ -141,7 +141,7 @@ partial void ProcessCreateMessageResponseContent( public async global::System.Threading.Tasks.Task CreateMessageAsync( string threadId, global::OpenAI.CreateMessageRequestRole role, - global::OpenAI.OneOf>> content, + global::OpenAI.OneOf> content, global::System.Collections.Generic.IList? attachments = default, object? metadata = default, global::System.Threading.CancellationToken cancellationToken = default) diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs index 1fd6fde4..c107ec61 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs @@ -202,7 +202,7 @@ partial void ProcessCreateRunResponseContent( string? instructions = default, string? additionalInstructions = default, global::System.Collections.Generic.IList? additionalMessages = default, - global::System.Collections.Generic.IList>? tools = default, + global::System.Collections.Generic.IList? tools = default, object? metadata = default, double? temperature = 1, double? topP = 1, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs index b8307999..dd5f5344 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs @@ -183,7 +183,7 @@ partial void ProcessCreateThreadAndRunResponseContent( global::OpenAI.CreateThreadRequest? thread = default, global::OpenAI.AnyOf? model = default, string? instructions = default, - global::System.Collections.Generic.IList>? tools = default, + global::System.Collections.Generic.IList? tools = default, global::OpenAI.CreateThreadAndRunRequestToolResources? toolResources = default, object? metadata = default, double? temperature = 1, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs index 66f6158b..66ea7479 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs @@ -170,7 +170,7 @@ partial void ProcessModifyAssistantResponseContent( string? name = default, string? description = default, string? instructions = default, - global::System.Collections.Generic.IList>? tools = default, + global::System.Collections.Generic.IList? tools = default, global::OpenAI.ModifyAssistantRequestToolResources? toolResources = default, object? metadata = default, double? temperature = 1, diff --git a/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs b/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs index 36525ea7..3eeea5ee 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs @@ -258,7 +258,7 @@ partial void ProcessCreateChatCompletionResponseContent( global::System.Collections.Generic.IList? modalities = default, global::OpenAI.CreateChatCompletionRequestAudio? audio = default, double? presencePenalty = 0, - global::OpenAI.OneOf? responseFormat = default, + global::OpenAI.ResponseFormat? responseFormat = default, int? seed = default, global::OpenAI.CreateChatCompletionRequestServiceTier? serviceTier = global::OpenAI.CreateChatCompletionRequestServiceTier.Auto, global::OpenAI.OneOf>? stop = default, diff --git a/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateAssistant.g.cs index cf4806d0..12224133 100644 --- a/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateAssistant.g.cs @@ -63,7 +63,7 @@ public partial interface IAssistantsClient string? name = default, string? description = default, string? instructions = default, - global::System.Collections.Generic.IList>? tools = default, + global::System.Collections.Generic.IList? tools = default, global::OpenAI.CreateAssistantRequestToolResources? toolResources = default, object? metadata = default, double? temperature = 1, diff --git a/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateMessage.g.cs index 5b618792..e72a64f3 100644 --- a/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateMessage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateMessage.g.cs @@ -37,7 +37,7 @@ public partial interface IAssistantsClient global::System.Threading.Tasks.Task CreateMessageAsync( string threadId, global::OpenAI.CreateMessageRequestRole role, - global::OpenAI.OneOf>> content, + global::OpenAI.OneOf> content, global::System.Collections.Generic.IList? attachments = default, object? metadata = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateRun.g.cs index c32e0d2e..284e6a10 100644 --- a/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateRun.g.cs @@ -94,7 +94,7 @@ public partial interface IAssistantsClient string? instructions = default, string? additionalInstructions = default, global::System.Collections.Generic.IList? additionalMessages = default, - global::System.Collections.Generic.IList>? tools = default, + global::System.Collections.Generic.IList? tools = default, object? metadata = default, double? temperature = 1, double? topP = 1, diff --git a/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateThreadAndRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateThreadAndRun.g.cs index 5465c942..fd267086 100644 --- a/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateThreadAndRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.CreateThreadAndRun.g.cs @@ -83,7 +83,7 @@ public partial interface IAssistantsClient global::OpenAI.CreateThreadRequest? thread = default, global::OpenAI.AnyOf? model = default, string? instructions = default, - global::System.Collections.Generic.IList>? tools = default, + global::System.Collections.Generic.IList? tools = default, global::OpenAI.CreateThreadAndRunRequestToolResources? toolResources = default, object? metadata = default, double? temperature = 1, diff --git a/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.ModifyAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.ModifyAssistant.g.cs index 9ecc3792..a2b8954b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.ModifyAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.IAssistantsClient.ModifyAssistant.g.cs @@ -66,7 +66,7 @@ public partial interface IAssistantsClient string? name = default, string? description = default, string? instructions = default, - global::System.Collections.Generic.IList>? tools = default, + global::System.Collections.Generic.IList? tools = default, global::OpenAI.ModifyAssistantRequestToolResources? toolResources = default, object? metadata = default, double? temperature = 1, diff --git a/src/libs/OpenAI/Generated/OpenAI.IChatClient.CreateChatCompletion.g.cs b/src/libs/OpenAI/Generated/OpenAI.IChatClient.CreateChatCompletion.g.cs index 0ef60b9a..29eb3709 100644 --- a/src/libs/OpenAI/Generated/OpenAI.IChatClient.CreateChatCompletion.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.IChatClient.CreateChatCompletion.g.cs @@ -158,7 +158,7 @@ public partial interface IChatClient global::System.Collections.Generic.IList? modalities = default, global::OpenAI.CreateChatCompletionRequestAudio? audio = default, double? presencePenalty = 0, - global::OpenAI.OneOf? responseFormat = default, + global::OpenAI.ResponseFormat? responseFormat = default, int? seed = default, global::OpenAI.CreateChatCompletionRequestServiceTier? serviceTier = global::OpenAI.CreateChatCompletionRequestServiceTier.Auto, global::OpenAI.OneOf>? stop = default, diff --git a/src/libs/OpenAI/Generated/OpenAI.IModerationsClient.CreateModeration.g.cs b/src/libs/OpenAI/Generated/OpenAI.IModerationsClient.CreateModeration.g.cs index f1debba4..396a1bcd 100644 --- a/src/libs/OpenAI/Generated/OpenAI.IModerationsClient.CreateModeration.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.IModerationsClient.CreateModeration.g.cs @@ -33,7 +33,7 @@ public partial interface IModerationsClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateModerationAsync( - global::OpenAI.OneOf, global::System.Collections.Generic.IList>> input, + global::OpenAI.OneOf, global::System.Collections.Generic.IList> input, global::OpenAI.AnyOf? model = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/OpenAI/Generated/OpenAI.IVectorStoresClient.CreateVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.IVectorStoresClient.CreateVectorStore.g.cs index c0be7544..f13c3b28 100644 --- a/src/libs/OpenAI/Generated/OpenAI.IVectorStoresClient.CreateVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.IVectorStoresClient.CreateVectorStore.g.cs @@ -38,7 +38,7 @@ public partial interface IVectorStoresClient global::System.Collections.Generic.IList? fileIds = default, string? name = default, global::OpenAI.VectorStoreExpirationAfter? expiresAfter = default, - global::OpenAI.OneOf? chunkingStrategy = default, + global::OpenAI.CreateVectorStoreRequestChunkingStrategy? chunkingStrategy = default, object? metadata = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.AnnotationsItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AnnotationsItem.g.cs new file mode 100644 index 00000000..b47f9b73 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AnnotationsItem.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct AnnotationsItem : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType? Type { get; } + + /// + /// A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageContentTextAnnotationsFileCitationObject? MessageContentTextFileCitationObject { get; init; } +#else + public global::OpenAI.MessageContentTextAnnotationsFileCitationObject? MessageContentTextFileCitationObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageContentTextFileCitationObject))] +#endif + public bool IsMessageContentTextFileCitationObject => MessageContentTextFileCitationObject != null; + + /// + /// + /// + public static implicit operator AnnotationsItem(global::OpenAI.MessageContentTextAnnotationsFileCitationObject value) => new AnnotationsItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageContentTextAnnotationsFileCitationObject?(AnnotationsItem @this) => @this.MessageContentTextFileCitationObject; + + /// + /// + /// + public AnnotationsItem(global::OpenAI.MessageContentTextAnnotationsFileCitationObject? value) + { + MessageContentTextFileCitationObject = value; + } + + /// + /// A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageContentTextAnnotationsFilePathObject? MessageContentTextFilePathObject { get; init; } +#else + public global::OpenAI.MessageContentTextAnnotationsFilePathObject? MessageContentTextFilePathObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageContentTextFilePathObject))] +#endif + public bool IsMessageContentTextFilePathObject => MessageContentTextFilePathObject != null; + + /// + /// + /// + public static implicit operator AnnotationsItem(global::OpenAI.MessageContentTextAnnotationsFilePathObject value) => new AnnotationsItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageContentTextAnnotationsFilePathObject?(AnnotationsItem @this) => @this.MessageContentTextFilePathObject; + + /// + /// + /// + public AnnotationsItem(global::OpenAI.MessageContentTextAnnotationsFilePathObject? value) + { + MessageContentTextFilePathObject = value; + } + + /// + /// + /// + public AnnotationsItem( + global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType? type, + global::OpenAI.MessageContentTextAnnotationsFileCitationObject? messageContentTextFileCitationObject, + global::OpenAI.MessageContentTextAnnotationsFilePathObject? messageContentTextFilePathObject + ) + { + Type = type; + + MessageContentTextFileCitationObject = messageContentTextFileCitationObject; + MessageContentTextFilePathObject = messageContentTextFilePathObject; + } + + /// + /// + /// + public object? Object => + MessageContentTextFilePathObject as object ?? + MessageContentTextFileCitationObject as object + ; + + /// + /// + /// + public bool Validate() + { + return IsMessageContentTextFileCitationObject && !IsMessageContentTextFilePathObject || !IsMessageContentTextFileCitationObject && IsMessageContentTextFilePathObject; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? messageContentTextFileCitationObject = null, + global::System.Func? messageContentTextFilePathObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageContentTextFileCitationObject && messageContentTextFileCitationObject != null) + { + return messageContentTextFileCitationObject(MessageContentTextFileCitationObject!); + } + else if (IsMessageContentTextFilePathObject && messageContentTextFilePathObject != null) + { + return messageContentTextFilePathObject(MessageContentTextFilePathObject!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? messageContentTextFileCitationObject = null, + global::System.Action? messageContentTextFilePathObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageContentTextFileCitationObject) + { + messageContentTextFileCitationObject?.Invoke(MessageContentTextFileCitationObject!); + } + else if (IsMessageContentTextFilePathObject) + { + messageContentTextFilePathObject?.Invoke(MessageContentTextFilePathObject!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + MessageContentTextFileCitationObject, + typeof(global::OpenAI.MessageContentTextAnnotationsFileCitationObject), + MessageContentTextFilePathObject, + typeof(global::OpenAI.MessageContentTextAnnotationsFilePathObject), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(AnnotationsItem other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageContentTextFileCitationObject, other.MessageContentTextFileCitationObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageContentTextFilePathObject, other.MessageContentTextFilePathObject) + ; + } + + /// + /// + /// + public static bool operator ==(AnnotationsItem obj1, AnnotationsItem obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(AnnotationsItem obj1, AnnotationsItem obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is AnnotationsItem o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.AnnotationsItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.AnnotationsItem), + jsonSerializerContext) as global::OpenAI.AnnotationsItem?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.AnnotationsItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.AnnotationsItem2.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AnnotationsItem2.g.cs new file mode 100644 index 00000000..0839e1ca --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AnnotationsItem2.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct AnnotationsItem2 : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType? Type { get; } + + /// + /// A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? MessageDeltaContentTextFileCitationObject { get; init; } +#else + public global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? MessageDeltaContentTextFileCitationObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaContentTextFileCitationObject))] +#endif + public bool IsMessageDeltaContentTextFileCitationObject => MessageDeltaContentTextFileCitationObject != null; + + /// + /// + /// + public static implicit operator AnnotationsItem2(global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject value) => new AnnotationsItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject?(AnnotationsItem2 @this) => @this.MessageDeltaContentTextFileCitationObject; + + /// + /// + /// + public AnnotationsItem2(global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? value) + { + MessageDeltaContentTextFileCitationObject = value; + } + + /// + /// A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? MessageDeltaContentTextFilePathObject { get; init; } +#else + public global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? MessageDeltaContentTextFilePathObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaContentTextFilePathObject))] +#endif + public bool IsMessageDeltaContentTextFilePathObject => MessageDeltaContentTextFilePathObject != null; + + /// + /// + /// + public static implicit operator AnnotationsItem2(global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject value) => new AnnotationsItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject?(AnnotationsItem2 @this) => @this.MessageDeltaContentTextFilePathObject; + + /// + /// + /// + public AnnotationsItem2(global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? value) + { + MessageDeltaContentTextFilePathObject = value; + } + + /// + /// + /// + public AnnotationsItem2( + global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType? type, + global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? messageDeltaContentTextFileCitationObject, + global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? messageDeltaContentTextFilePathObject + ) + { + Type = type; + + MessageDeltaContentTextFileCitationObject = messageDeltaContentTextFileCitationObject; + MessageDeltaContentTextFilePathObject = messageDeltaContentTextFilePathObject; + } + + /// + /// + /// + public object? Object => + MessageDeltaContentTextFilePathObject as object ?? + MessageDeltaContentTextFileCitationObject as object + ; + + /// + /// + /// + public bool Validate() + { + return IsMessageDeltaContentTextFileCitationObject && !IsMessageDeltaContentTextFilePathObject || !IsMessageDeltaContentTextFileCitationObject && IsMessageDeltaContentTextFilePathObject; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? messageDeltaContentTextFileCitationObject = null, + global::System.Func? messageDeltaContentTextFilePathObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageDeltaContentTextFileCitationObject && messageDeltaContentTextFileCitationObject != null) + { + return messageDeltaContentTextFileCitationObject(MessageDeltaContentTextFileCitationObject!); + } + else if (IsMessageDeltaContentTextFilePathObject && messageDeltaContentTextFilePathObject != null) + { + return messageDeltaContentTextFilePathObject(MessageDeltaContentTextFilePathObject!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? messageDeltaContentTextFileCitationObject = null, + global::System.Action? messageDeltaContentTextFilePathObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageDeltaContentTextFileCitationObject) + { + messageDeltaContentTextFileCitationObject?.Invoke(MessageDeltaContentTextFileCitationObject!); + } + else if (IsMessageDeltaContentTextFilePathObject) + { + messageDeltaContentTextFilePathObject?.Invoke(MessageDeltaContentTextFilePathObject!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + MessageDeltaContentTextFileCitationObject, + typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject), + MessageDeltaContentTextFilePathObject, + typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(AnnotationsItem2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaContentTextFileCitationObject, other.MessageDeltaContentTextFileCitationObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaContentTextFilePathObject, other.MessageDeltaContentTextFilePathObject) + ; + } + + /// + /// + /// + public static bool operator ==(AnnotationsItem2 obj1, AnnotationsItem2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(AnnotationsItem2 obj1, AnnotationsItem2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is AnnotationsItem2 o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.AnnotationsItem2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.AnnotationsItem2), + jsonSerializerContext) as global::OpenAI.AnnotationsItem2?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.AnnotationsItem2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.AssistantObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantObject.g.cs index bd084588..e8d73dd3 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.AssistantObject.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantObject.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -65,7 +63,7 @@ public sealed partial class AssistantObject /// [global::System.Text.Json.Serialization.JsonPropertyName("tools")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> Tools { get; set; } + public required global::System.Collections.Generic.IList Tools { get; set; } /// /// A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.AssistantObjectToolDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantObjectToolDiscriminator.g.cs new file mode 100644 index 00000000..a2deeaa2 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantObjectToolDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class AssistantObjectToolDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantObjectToolDiscriminatorTypeJsonConverter))] + public global::OpenAI.AssistantObjectToolDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.AssistantObjectToolDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.AssistantObjectToolDiscriminator), + jsonSerializerContext) as global::OpenAI.AssistantObjectToolDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.AssistantObjectToolDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.AssistantObjectToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantObjectToolDiscriminatorType.g.cs new file mode 100644 index 00000000..498786f6 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantObjectToolDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum AssistantObjectToolDiscriminatorType + { + /// + /// + /// + CodeInterpreter, + /// + /// + /// + FileSearch, + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AssistantObjectToolDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AssistantObjectToolDiscriminatorType value) + { + return value switch + { + AssistantObjectToolDiscriminatorType.CodeInterpreter => "code_interpreter", + AssistantObjectToolDiscriminatorType.FileSearch => "file_search", + AssistantObjectToolDiscriminatorType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AssistantObjectToolDiscriminatorType? ToEnum(string value) + { + return value switch + { + "code_interpreter" => AssistantObjectToolDiscriminatorType.CodeInterpreter, + "file_search" => AssistantObjectToolDiscriminatorType.FileSearch, + "function" => AssistantObjectToolDiscriminatorType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEvent.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEvent.g.cs index 0eb36817..9e4fd534 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEvent.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEvent.g.cs @@ -27,243 +27,973 @@ namespace OpenAI /// /// /// + public global::OpenAI.AssistantStreamEventDiscriminatorEvent? Event { get; } + + /// + /// Occurs when an [error](/docs/guides/error-codes/api-errors) occurs. This can happen due to an internal server error or a timeout. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.ErrorEvent? Value1 { get; init; } +#else + public global::OpenAI.ErrorEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.ErrorEvent value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.ErrorEvent?(AssistantStreamEvent @this) => @this.Value1; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.ErrorEvent? value) + { + Value1 = value; + } + + /// + /// Occurs when a stream ends. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.DoneEvent? Value2 { get; init; } +#else + public global::OpenAI.DoneEvent? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.DoneEvent value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.DoneEvent?(AssistantStreamEvent @this) => @this.Value2; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.DoneEvent? value) + { + Value2 = value; + } + + /// + /// Occurs when a new [thread](/docs/api-reference/threads/object) is created. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant3? Value3 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant3? Value3 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] +#endif + public bool IsValue3 => Value3 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant3 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant3?(AssistantStreamEvent @this) => @this.Value3; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant3? value) + { + Value3 = value; + } + + /// + /// Occurs when a new [run](/docs/api-reference/runs/object) is created. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant4? Value4 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant4? Value4 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] +#endif + public bool IsValue4 => Value4 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant4 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant4?(AssistantStreamEvent @this) => @this.Value4; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant4? value) + { + Value4 = value; + } + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `queued` status. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant5? Value5 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant5? Value5 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] +#endif + public bool IsValue5 => Value5 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant5 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant5?(AssistantStreamEvent @this) => @this.Value5; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant5? value) + { + Value5 = value; + } + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) moves to an `in_progress` status. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant6? Value6 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant6? Value6 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] +#endif + public bool IsValue6 => Value6 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant6 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant6?(AssistantStreamEvent @this) => @this.Value6; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant6? value) + { + Value6 = value; + } + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `requires_action` status. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant7? Value7 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant7? Value7 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] +#endif + public bool IsValue7 => Value7 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant7 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant7?(AssistantStreamEvent @this) => @this.Value7; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant7? value) + { + Value7 = value; + } + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) is completed. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant8? Value8 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant8? Value8 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value8))] +#endif + public bool IsValue8 => Value8 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant8 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant8?(AssistantStreamEvent @this) => @this.Value8; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant8? value) + { + Value8 = value; + } + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) ends with status `incomplete`. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant9? Value9 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant9? Value9 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value9))] +#endif + public bool IsValue9 => Value9 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant9 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant9?(AssistantStreamEvent @this) => @this.Value9; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant9? value) + { + Value9 = value; + } + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) fails. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant10? Value10 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant10? Value10 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value10))] +#endif + public bool IsValue10 => Value10 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant10 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant10?(AssistantStreamEvent @this) => @this.Value10; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant10? value) + { + Value10 = value; + } + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `cancelling` status. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant11? Value11 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant11? Value11 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value11))] +#endif + public bool IsValue11 => Value11 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant11 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant11?(AssistantStreamEvent @this) => @this.Value11; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant11? value) + { + Value11 = value; + } + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) is cancelled. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant12? Value12 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant12? Value12 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value12))] +#endif + public bool IsValue12 => Value12 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant12 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant12?(AssistantStreamEvent @this) => @this.Value12; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant12? value) + { + Value12 = value; + } + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) expires. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant13? Value13 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant13? Value13 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value13))] +#endif + public bool IsValue13 => Value13 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant13 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant13?(AssistantStreamEvent @this) => @this.Value13; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant13? value) + { + Value13 = value; + } + + /// + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is created. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant14? Value14 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant14? Value14 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value14))] +#endif + public bool IsValue14 => Value14 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant14 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant14?(AssistantStreamEvent @this) => @this.Value14; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant14? value) + { + Value14 = value; + } + + /// + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. + /// #if NET6_0_OR_GREATER - public global::OpenAI.ThreadStreamEvent? Thread { get; init; } + public global::OpenAI.AssistantStreamEventVariant15? Value15 { get; init; } #else - public global::OpenAI.ThreadStreamEvent? Thread { get; } + public global::OpenAI.AssistantStreamEventVariant15? Value15 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Thread))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value15))] #endif - public bool IsThread => Thread != null; + public bool IsValue15 => Value15 != null; /// /// /// - public static implicit operator AssistantStreamEvent(global::OpenAI.ThreadStreamEvent value) => new AssistantStreamEvent(value); + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant15 value) => new AssistantStreamEvent(value); /// /// /// - public static implicit operator global::OpenAI.ThreadStreamEvent?(AssistantStreamEvent @this) => @this.Thread; + public static implicit operator global::OpenAI.AssistantStreamEventVariant15?(AssistantStreamEvent @this) => @this.Value15; /// /// /// - public AssistantStreamEvent(global::OpenAI.ThreadStreamEvent? value) + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant15? value) { - Thread = value; + Value15 = value; } + /// + /// Occurs when parts of a [run step](/docs/api-reference/run-steps/step-object) are being streamed. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant16? Value16 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant16? Value16 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value16))] +#endif + public bool IsValue16 => Value16 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant16 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant16?(AssistantStreamEvent @this) => @this.Value16; + /// /// /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant16? value) + { + Value16 = value; + } + + /// + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is completed. + /// #if NET6_0_OR_GREATER - public global::OpenAI.RunStreamEvent? Run { get; init; } + public global::OpenAI.AssistantStreamEventVariant17? Value17 { get; init; } #else - public global::OpenAI.RunStreamEvent? Run { get; } + public global::OpenAI.AssistantStreamEventVariant17? Value17 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Run))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value17))] #endif - public bool IsRun => Run != null; + public bool IsValue17 => Value17 != null; /// /// /// - public static implicit operator AssistantStreamEvent(global::OpenAI.RunStreamEvent value) => new AssistantStreamEvent(value); + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant17 value) => new AssistantStreamEvent(value); /// /// /// - public static implicit operator global::OpenAI.RunStreamEvent?(AssistantStreamEvent @this) => @this.Run; + public static implicit operator global::OpenAI.AssistantStreamEventVariant17?(AssistantStreamEvent @this) => @this.Value17; /// /// /// - public AssistantStreamEvent(global::OpenAI.RunStreamEvent? value) + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant17? value) { - Run = value; + Value17 = value; } + /// + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) fails. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant18? Value18 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant18? Value18 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value18))] +#endif + public bool IsValue18 => Value18 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant18 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant18?(AssistantStreamEvent @this) => @this.Value18; + /// /// /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant18? value) + { + Value18 = value; + } + + /// + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is cancelled. + /// #if NET6_0_OR_GREATER - public global::OpenAI.RunStepStreamEvent? RunStep { get; init; } + public global::OpenAI.AssistantStreamEventVariant19? Value19 { get; init; } #else - public global::OpenAI.RunStepStreamEvent? RunStep { get; } + public global::OpenAI.AssistantStreamEventVariant19? Value19 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStep))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value19))] #endif - public bool IsRunStep => RunStep != null; + public bool IsValue19 => Value19 != null; /// /// /// - public static implicit operator AssistantStreamEvent(global::OpenAI.RunStepStreamEvent value) => new AssistantStreamEvent(value); + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant19 value) => new AssistantStreamEvent(value); /// /// /// - public static implicit operator global::OpenAI.RunStepStreamEvent?(AssistantStreamEvent @this) => @this.RunStep; + public static implicit operator global::OpenAI.AssistantStreamEventVariant19?(AssistantStreamEvent @this) => @this.Value19; /// /// /// - public AssistantStreamEvent(global::OpenAI.RunStepStreamEvent? value) + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant19? value) { - RunStep = value; + Value19 = value; } + /// + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) expires. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant20? Value20 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant20? Value20 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value20))] +#endif + public bool IsValue20 => Value20 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant20 value) => new AssistantStreamEvent(value); + /// /// /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant20?(AssistantStreamEvent @this) => @this.Value20; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant20? value) + { + Value20 = value; + } + + /// + /// Occurs when a [message](/docs/api-reference/messages/object) is created. + /// #if NET6_0_OR_GREATER - public global::OpenAI.MessageStreamEvent? Message { get; init; } + public global::OpenAI.AssistantStreamEventVariant21? Value21 { get; init; } #else - public global::OpenAI.MessageStreamEvent? Message { get; } + public global::OpenAI.AssistantStreamEventVariant21? Value21 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Message))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value21))] #endif - public bool IsMessage => Message != null; + public bool IsValue21 => Value21 != null; /// /// /// - public static implicit operator AssistantStreamEvent(global::OpenAI.MessageStreamEvent value) => new AssistantStreamEvent(value); + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant21 value) => new AssistantStreamEvent(value); /// /// /// - public static implicit operator global::OpenAI.MessageStreamEvent?(AssistantStreamEvent @this) => @this.Message; + public static implicit operator global::OpenAI.AssistantStreamEventVariant21?(AssistantStreamEvent @this) => @this.Value21; /// /// /// - public AssistantStreamEvent(global::OpenAI.MessageStreamEvent? value) + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant21? value) { - Message = value; + Value21 = value; } /// - /// Occurs when an [error](/docs/guides/error-codes/api-errors) occurs. This can happen due to an internal server error or a timeout. + /// Occurs when a [message](/docs/api-reference/messages/object) moves to an `in_progress` state. /// #if NET6_0_OR_GREATER - public global::OpenAI.ErrorEvent? Error { get; init; } + public global::OpenAI.AssistantStreamEventVariant22? Value22 { get; init; } #else - public global::OpenAI.ErrorEvent? Error { get; } + public global::OpenAI.AssistantStreamEventVariant22? Value22 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value22))] #endif - public bool IsError => Error != null; + public bool IsValue22 => Value22 != null; /// /// /// - public static implicit operator AssistantStreamEvent(global::OpenAI.ErrorEvent value) => new AssistantStreamEvent(value); + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant22 value) => new AssistantStreamEvent(value); /// /// /// - public static implicit operator global::OpenAI.ErrorEvent?(AssistantStreamEvent @this) => @this.Error; + public static implicit operator global::OpenAI.AssistantStreamEventVariant22?(AssistantStreamEvent @this) => @this.Value22; /// /// /// - public AssistantStreamEvent(global::OpenAI.ErrorEvent? value) + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant22? value) { - Error = value; + Value22 = value; } /// - /// Occurs when a stream ends. + /// Occurs when parts of a [Message](/docs/api-reference/messages/object) are being streamed. /// #if NET6_0_OR_GREATER - public global::OpenAI.DoneEvent? Done { get; init; } + public global::OpenAI.AssistantStreamEventVariant23? Value23 { get; init; } #else - public global::OpenAI.DoneEvent? Done { get; } + public global::OpenAI.AssistantStreamEventVariant23? Value23 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Done))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value23))] #endif - public bool IsDone => Done != null; + public bool IsValue23 => Value23 != null; /// /// /// - public static implicit operator AssistantStreamEvent(global::OpenAI.DoneEvent value) => new AssistantStreamEvent(value); + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant23 value) => new AssistantStreamEvent(value); /// /// /// - public static implicit operator global::OpenAI.DoneEvent?(AssistantStreamEvent @this) => @this.Done; + public static implicit operator global::OpenAI.AssistantStreamEventVariant23?(AssistantStreamEvent @this) => @this.Value23; /// /// /// - public AssistantStreamEvent(global::OpenAI.DoneEvent? value) + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant23? value) + { + Value23 = value; + } + + /// + /// Occurs when a [message](/docs/api-reference/messages/object) is completed. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant24? Value24 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant24? Value24 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value24))] +#endif + public bool IsValue24 => Value24 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant24 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant24?(AssistantStreamEvent @this) => @this.Value24; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant24? value) + { + Value24 = value; + } + + /// + /// Occurs when a [message](/docs/api-reference/messages/object) ends before it is completed. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantStreamEventVariant25? Value25 { get; init; } +#else + public global::OpenAI.AssistantStreamEventVariant25? Value25 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value25))] +#endif + public bool IsValue25 => Value25 != null; + + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant25 value) => new AssistantStreamEvent(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantStreamEventVariant25?(AssistantStreamEvent @this) => @this.Value25; + + /// + /// + /// + public AssistantStreamEvent(global::OpenAI.AssistantStreamEventVariant25? value) { - Done = value; + Value25 = value; } /// /// /// public AssistantStreamEvent( - global::OpenAI.ThreadStreamEvent? thread, - global::OpenAI.RunStreamEvent? run, - global::OpenAI.RunStepStreamEvent? runStep, - global::OpenAI.MessageStreamEvent? message, - global::OpenAI.ErrorEvent? error, - global::OpenAI.DoneEvent? done + global::OpenAI.AssistantStreamEventDiscriminatorEvent? @event, + global::OpenAI.ErrorEvent? value1, + global::OpenAI.DoneEvent? value2, + global::OpenAI.AssistantStreamEventVariant3? value3, + global::OpenAI.AssistantStreamEventVariant4? value4, + global::OpenAI.AssistantStreamEventVariant5? value5, + global::OpenAI.AssistantStreamEventVariant6? value6, + global::OpenAI.AssistantStreamEventVariant7? value7, + global::OpenAI.AssistantStreamEventVariant8? value8, + global::OpenAI.AssistantStreamEventVariant9? value9, + global::OpenAI.AssistantStreamEventVariant10? value10, + global::OpenAI.AssistantStreamEventVariant11? value11, + global::OpenAI.AssistantStreamEventVariant12? value12, + global::OpenAI.AssistantStreamEventVariant13? value13, + global::OpenAI.AssistantStreamEventVariant14? value14, + global::OpenAI.AssistantStreamEventVariant15? value15, + global::OpenAI.AssistantStreamEventVariant16? value16, + global::OpenAI.AssistantStreamEventVariant17? value17, + global::OpenAI.AssistantStreamEventVariant18? value18, + global::OpenAI.AssistantStreamEventVariant19? value19, + global::OpenAI.AssistantStreamEventVariant20? value20, + global::OpenAI.AssistantStreamEventVariant21? value21, + global::OpenAI.AssistantStreamEventVariant22? value22, + global::OpenAI.AssistantStreamEventVariant23? value23, + global::OpenAI.AssistantStreamEventVariant24? value24, + global::OpenAI.AssistantStreamEventVariant25? value25 ) { - Thread = thread; - Run = run; - RunStep = runStep; - Message = message; - Error = error; - Done = done; + Event = @event; + + Value1 = value1; + Value2 = value2; + Value3 = value3; + Value4 = value4; + Value5 = value5; + Value6 = value6; + Value7 = value7; + Value8 = value8; + Value9 = value9; + Value10 = value10; + Value11 = value11; + Value12 = value12; + Value13 = value13; + Value14 = value14; + Value15 = value15; + Value16 = value16; + Value17 = value17; + Value18 = value18; + Value19 = value19; + Value20 = value20; + Value21 = value21; + Value22 = value22; + Value23 = value23; + Value24 = value24; + Value25 = value25; } /// /// /// public object? Object => - Done as object ?? - Error as object ?? - Message as object ?? - RunStep as object ?? - Run as object ?? - Thread as object + Value25 as object ?? + Value24 as object ?? + Value23 as object ?? + Value22 as object ?? + Value21 as object ?? + Value20 as object ?? + Value19 as object ?? + Value18 as object ?? + Value17 as object ?? + Value16 as object ?? + Value15 as object ?? + Value14 as object ?? + Value13 as object ?? + Value12 as object ?? + Value11 as object ?? + Value10 as object ?? + Value9 as object ?? + Value8 as object ?? + Value7 as object ?? + Value6 as object ?? + Value5 as object ?? + Value4 as object ?? + Value3 as object ?? + Value2 as object ?? + Value1 as object ; /// @@ -271,19 +1001,38 @@ Thread as object /// public bool Validate() { - return IsThread && !IsRun && !IsRunStep && !IsMessage && !IsError && !IsDone || !IsThread && IsRun && !IsRunStep && !IsMessage && !IsError && !IsDone || !IsThread && !IsRun && IsRunStep && !IsMessage && !IsError && !IsDone || !IsThread && !IsRun && !IsRunStep && IsMessage && !IsError && !IsDone || !IsThread && !IsRun && !IsRunStep && !IsMessage && IsError && !IsDone || !IsThread && !IsRun && !IsRunStep && !IsMessage && !IsError && IsDone; + return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && IsValue25; } /// /// /// public TResult? Match( - global::System.Func? thread = null, - global::System.Func? run = null, - global::System.Func? runStep = null, - global::System.Func? message = null, - global::System.Func? error = null, - global::System.Func? done = null, + global::System.Func? value1 = null, + global::System.Func? value2 = null, + global::System.Func? value3 = null, + global::System.Func? value4 = null, + global::System.Func? value5 = null, + global::System.Func? value6 = null, + global::System.Func? value7 = null, + global::System.Func? value8 = null, + global::System.Func? value9 = null, + global::System.Func? value10 = null, + global::System.Func? value11 = null, + global::System.Func? value12 = null, + global::System.Func? value13 = null, + global::System.Func? value14 = null, + global::System.Func? value15 = null, + global::System.Func? value16 = null, + global::System.Func? value17 = null, + global::System.Func? value18 = null, + global::System.Func? value19 = null, + global::System.Func? value20 = null, + global::System.Func? value21 = null, + global::System.Func? value22 = null, + global::System.Func? value23 = null, + global::System.Func? value24 = null, + global::System.Func? value25 = null, bool validate = true) { if (validate) @@ -291,29 +1040,105 @@ public bool Validate() Validate(); } - if (IsThread && thread != null) + if (IsValue1 && value1 != null) + { + return value1(Value1!); + } + else if (IsValue2 && value2 != null) + { + return value2(Value2!); + } + else if (IsValue3 && value3 != null) + { + return value3(Value3!); + } + else if (IsValue4 && value4 != null) + { + return value4(Value4!); + } + else if (IsValue5 && value5 != null) + { + return value5(Value5!); + } + else if (IsValue6 && value6 != null) + { + return value6(Value6!); + } + else if (IsValue7 && value7 != null) { - return thread(Thread!); + return value7(Value7!); } - else if (IsRun && run != null) + else if (IsValue8 && value8 != null) { - return run(Run!); + return value8(Value8!); } - else if (IsRunStep && runStep != null) + else if (IsValue9 && value9 != null) { - return runStep(RunStep!); + return value9(Value9!); } - else if (IsMessage && message != null) + else if (IsValue10 && value10 != null) { - return message(Message!); + return value10(Value10!); } - else if (IsError && error != null) + else if (IsValue11 && value11 != null) { - return error(Error!); + return value11(Value11!); } - else if (IsDone && done != null) + else if (IsValue12 && value12 != null) { - return done(Done!); + return value12(Value12!); + } + else if (IsValue13 && value13 != null) + { + return value13(Value13!); + } + else if (IsValue14 && value14 != null) + { + return value14(Value14!); + } + else if (IsValue15 && value15 != null) + { + return value15(Value15!); + } + else if (IsValue16 && value16 != null) + { + return value16(Value16!); + } + else if (IsValue17 && value17 != null) + { + return value17(Value17!); + } + else if (IsValue18 && value18 != null) + { + return value18(Value18!); + } + else if (IsValue19 && value19 != null) + { + return value19(Value19!); + } + else if (IsValue20 && value20 != null) + { + return value20(Value20!); + } + else if (IsValue21 && value21 != null) + { + return value21(Value21!); + } + else if (IsValue22 && value22 != null) + { + return value22(Value22!); + } + else if (IsValue23 && value23 != null) + { + return value23(Value23!); + } + else if (IsValue24 && value24 != null) + { + return value24(Value24!); + } + else if (IsValue25 && value25 != null) + { + return value25(Value25!); } return default(TResult); @@ -323,12 +1148,31 @@ public bool Validate() /// /// public void Match( - global::System.Action? thread = null, - global::System.Action? run = null, - global::System.Action? runStep = null, - global::System.Action? message = null, - global::System.Action? error = null, - global::System.Action? done = null, + global::System.Action? value1 = null, + global::System.Action? value2 = null, + global::System.Action? value3 = null, + global::System.Action? value4 = null, + global::System.Action? value5 = null, + global::System.Action? value6 = null, + global::System.Action? value7 = null, + global::System.Action? value8 = null, + global::System.Action? value9 = null, + global::System.Action? value10 = null, + global::System.Action? value11 = null, + global::System.Action? value12 = null, + global::System.Action? value13 = null, + global::System.Action? value14 = null, + global::System.Action? value15 = null, + global::System.Action? value16 = null, + global::System.Action? value17 = null, + global::System.Action? value18 = null, + global::System.Action? value19 = null, + global::System.Action? value20 = null, + global::System.Action? value21 = null, + global::System.Action? value22 = null, + global::System.Action? value23 = null, + global::System.Action? value24 = null, + global::System.Action? value25 = null, bool validate = true) { if (validate) @@ -336,29 +1180,105 @@ public void Match( Validate(); } - if (IsThread) + if (IsValue1) + { + value1?.Invoke(Value1!); + } + else if (IsValue2) + { + value2?.Invoke(Value2!); + } + else if (IsValue3) + { + value3?.Invoke(Value3!); + } + else if (IsValue4) + { + value4?.Invoke(Value4!); + } + else if (IsValue5) + { + value5?.Invoke(Value5!); + } + else if (IsValue6) + { + value6?.Invoke(Value6!); + } + else if (IsValue7) + { + value7?.Invoke(Value7!); + } + else if (IsValue8) + { + value8?.Invoke(Value8!); + } + else if (IsValue9) + { + value9?.Invoke(Value9!); + } + else if (IsValue10) + { + value10?.Invoke(Value10!); + } + else if (IsValue11) + { + value11?.Invoke(Value11!); + } + else if (IsValue12) + { + value12?.Invoke(Value12!); + } + else if (IsValue13) + { + value13?.Invoke(Value13!); + } + else if (IsValue14) + { + value14?.Invoke(Value14!); + } + else if (IsValue15) + { + value15?.Invoke(Value15!); + } + else if (IsValue16) + { + value16?.Invoke(Value16!); + } + else if (IsValue17) + { + value17?.Invoke(Value17!); + } + else if (IsValue18) + { + value18?.Invoke(Value18!); + } + else if (IsValue19) + { + value19?.Invoke(Value19!); + } + else if (IsValue20) { - thread?.Invoke(Thread!); + value20?.Invoke(Value20!); } - else if (IsRun) + else if (IsValue21) { - run?.Invoke(Run!); + value21?.Invoke(Value21!); } - else if (IsRunStep) + else if (IsValue22) { - runStep?.Invoke(RunStep!); + value22?.Invoke(Value22!); } - else if (IsMessage) + else if (IsValue23) { - message?.Invoke(Message!); + value23?.Invoke(Value23!); } - else if (IsError) + else if (IsValue24) { - error?.Invoke(Error!); + value24?.Invoke(Value24!); } - else if (IsDone) + else if (IsValue25) { - done?.Invoke(Done!); + value25?.Invoke(Value25!); } } @@ -369,18 +1289,56 @@ public override int GetHashCode() { var fields = new object?[] { - Thread, - typeof(global::OpenAI.ThreadStreamEvent), - Run, - typeof(global::OpenAI.RunStreamEvent), - RunStep, - typeof(global::OpenAI.RunStepStreamEvent), - Message, - typeof(global::OpenAI.MessageStreamEvent), - Error, + Value1, typeof(global::OpenAI.ErrorEvent), - Done, + Value2, typeof(global::OpenAI.DoneEvent), + Value3, + typeof(global::OpenAI.AssistantStreamEventVariant3), + Value4, + typeof(global::OpenAI.AssistantStreamEventVariant4), + Value5, + typeof(global::OpenAI.AssistantStreamEventVariant5), + Value6, + typeof(global::OpenAI.AssistantStreamEventVariant6), + Value7, + typeof(global::OpenAI.AssistantStreamEventVariant7), + Value8, + typeof(global::OpenAI.AssistantStreamEventVariant8), + Value9, + typeof(global::OpenAI.AssistantStreamEventVariant9), + Value10, + typeof(global::OpenAI.AssistantStreamEventVariant10), + Value11, + typeof(global::OpenAI.AssistantStreamEventVariant11), + Value12, + typeof(global::OpenAI.AssistantStreamEventVariant12), + Value13, + typeof(global::OpenAI.AssistantStreamEventVariant13), + Value14, + typeof(global::OpenAI.AssistantStreamEventVariant14), + Value15, + typeof(global::OpenAI.AssistantStreamEventVariant15), + Value16, + typeof(global::OpenAI.AssistantStreamEventVariant16), + Value17, + typeof(global::OpenAI.AssistantStreamEventVariant17), + Value18, + typeof(global::OpenAI.AssistantStreamEventVariant18), + Value19, + typeof(global::OpenAI.AssistantStreamEventVariant19), + Value20, + typeof(global::OpenAI.AssistantStreamEventVariant20), + Value21, + typeof(global::OpenAI.AssistantStreamEventVariant21), + Value22, + typeof(global::OpenAI.AssistantStreamEventVariant22), + Value23, + typeof(global::OpenAI.AssistantStreamEventVariant23), + Value24, + typeof(global::OpenAI.AssistantStreamEventVariant24), + Value25, + typeof(global::OpenAI.AssistantStreamEventVariant25), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -396,12 +1354,31 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(AssistantStreamEvent other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Thread, other.Thread) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Run, other.Run) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStep, other.RunStep) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Message, other.Message) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Done, other.Done) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value3, other.Value3) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value6, other.Value6) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value7, other.Value7) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value8, other.Value8) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value9, other.Value9) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value10, other.Value10) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value11, other.Value11) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value12, other.Value12) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value13, other.Value13) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value14, other.Value14) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value15, other.Value15) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value16, other.Value16) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value17, other.Value17) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value18, other.Value18) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value19, other.Value19) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value20, other.Value20) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value21, other.Value21) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value22, other.Value22) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value23, other.Value23) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value24, other.Value24) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value25, other.Value25) ; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventDiscriminator.g.cs new file mode 100644 index 00000000..c7db9d61 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class AssistantStreamEventDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("event")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventDiscriminatorEventJsonConverter))] + public global::OpenAI.AssistantStreamEventDiscriminatorEvent? Event { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.AssistantStreamEventDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.AssistantStreamEventDiscriminator), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.AssistantStreamEventDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventDiscriminatorEvent.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventDiscriminatorEvent.g.cs new file mode 100644 index 00000000..cef05e71 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventDiscriminatorEvent.g.cs @@ -0,0 +1,189 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum AssistantStreamEventDiscriminatorEvent + { + /// + /// + /// + Error, + /// + /// + /// + Done, + /// + /// + /// + ThreadCreated, + /// + /// + /// + ThreadRunCreated, + /// + /// + /// + ThreadRunQueued, + /// + /// + /// + ThreadRunInProgress, + /// + /// + /// + ThreadRunRequiresAction, + /// + /// + /// + ThreadRunCompleted, + /// + /// + /// + ThreadRunIncomplete, + /// + /// + /// + ThreadRunFailed, + /// + /// + /// + ThreadRunCancelling, + /// + /// + /// + ThreadRunCancelled, + /// + /// + /// + ThreadRunExpired, + /// + /// + /// + ThreadRunStepCreated, + /// + /// + /// + ThreadRunStepInProgress, + /// + /// + /// + ThreadRunStepDelta, + /// + /// + /// + ThreadRunStepCompleted, + /// + /// + /// + ThreadRunStepFailed, + /// + /// + /// + ThreadRunStepCancelled, + /// + /// + /// + ThreadRunStepExpired, + /// + /// + /// + ThreadMessageCreated, + /// + /// + /// + ThreadMessageInProgress, + /// + /// + /// + ThreadMessageDelta, + /// + /// + /// + ThreadMessageCompleted, + /// + /// + /// + ThreadMessageIncomplete, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AssistantStreamEventDiscriminatorEventExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AssistantStreamEventDiscriminatorEvent value) + { + return value switch + { + AssistantStreamEventDiscriminatorEvent.Error => "error", + AssistantStreamEventDiscriminatorEvent.Done => "done", + AssistantStreamEventDiscriminatorEvent.ThreadCreated => "thread.created", + AssistantStreamEventDiscriminatorEvent.ThreadRunCreated => "thread.run.created", + AssistantStreamEventDiscriminatorEvent.ThreadRunQueued => "thread.run.queued", + AssistantStreamEventDiscriminatorEvent.ThreadRunInProgress => "thread.run.in_progress", + AssistantStreamEventDiscriminatorEvent.ThreadRunRequiresAction => "thread.run.requires_action", + AssistantStreamEventDiscriminatorEvent.ThreadRunCompleted => "thread.run.completed", + AssistantStreamEventDiscriminatorEvent.ThreadRunIncomplete => "thread.run.incomplete", + AssistantStreamEventDiscriminatorEvent.ThreadRunFailed => "thread.run.failed", + AssistantStreamEventDiscriminatorEvent.ThreadRunCancelling => "thread.run.cancelling", + AssistantStreamEventDiscriminatorEvent.ThreadRunCancelled => "thread.run.cancelled", + AssistantStreamEventDiscriminatorEvent.ThreadRunExpired => "thread.run.expired", + AssistantStreamEventDiscriminatorEvent.ThreadRunStepCreated => "thread.run.step.created", + AssistantStreamEventDiscriminatorEvent.ThreadRunStepInProgress => "thread.run.step.in_progress", + AssistantStreamEventDiscriminatorEvent.ThreadRunStepDelta => "thread.run.step.delta", + AssistantStreamEventDiscriminatorEvent.ThreadRunStepCompleted => "thread.run.step.completed", + AssistantStreamEventDiscriminatorEvent.ThreadRunStepFailed => "thread.run.step.failed", + AssistantStreamEventDiscriminatorEvent.ThreadRunStepCancelled => "thread.run.step.cancelled", + AssistantStreamEventDiscriminatorEvent.ThreadRunStepExpired => "thread.run.step.expired", + AssistantStreamEventDiscriminatorEvent.ThreadMessageCreated => "thread.message.created", + AssistantStreamEventDiscriminatorEvent.ThreadMessageInProgress => "thread.message.in_progress", + AssistantStreamEventDiscriminatorEvent.ThreadMessageDelta => "thread.message.delta", + AssistantStreamEventDiscriminatorEvent.ThreadMessageCompleted => "thread.message.completed", + AssistantStreamEventDiscriminatorEvent.ThreadMessageIncomplete => "thread.message.incomplete", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AssistantStreamEventDiscriminatorEvent? ToEnum(string value) + { + return value switch + { + "error" => AssistantStreamEventDiscriminatorEvent.Error, + "done" => AssistantStreamEventDiscriminatorEvent.Done, + "thread.created" => AssistantStreamEventDiscriminatorEvent.ThreadCreated, + "thread.run.created" => AssistantStreamEventDiscriminatorEvent.ThreadRunCreated, + "thread.run.queued" => AssistantStreamEventDiscriminatorEvent.ThreadRunQueued, + "thread.run.in_progress" => AssistantStreamEventDiscriminatorEvent.ThreadRunInProgress, + "thread.run.requires_action" => AssistantStreamEventDiscriminatorEvent.ThreadRunRequiresAction, + "thread.run.completed" => AssistantStreamEventDiscriminatorEvent.ThreadRunCompleted, + "thread.run.incomplete" => AssistantStreamEventDiscriminatorEvent.ThreadRunIncomplete, + "thread.run.failed" => AssistantStreamEventDiscriminatorEvent.ThreadRunFailed, + "thread.run.cancelling" => AssistantStreamEventDiscriminatorEvent.ThreadRunCancelling, + "thread.run.cancelled" => AssistantStreamEventDiscriminatorEvent.ThreadRunCancelled, + "thread.run.expired" => AssistantStreamEventDiscriminatorEvent.ThreadRunExpired, + "thread.run.step.created" => AssistantStreamEventDiscriminatorEvent.ThreadRunStepCreated, + "thread.run.step.in_progress" => AssistantStreamEventDiscriminatorEvent.ThreadRunStepInProgress, + "thread.run.step.delta" => AssistantStreamEventDiscriminatorEvent.ThreadRunStepDelta, + "thread.run.step.completed" => AssistantStreamEventDiscriminatorEvent.ThreadRunStepCompleted, + "thread.run.step.failed" => AssistantStreamEventDiscriminatorEvent.ThreadRunStepFailed, + "thread.run.step.cancelled" => AssistantStreamEventDiscriminatorEvent.ThreadRunStepCancelled, + "thread.run.step.expired" => AssistantStreamEventDiscriminatorEvent.ThreadRunStepExpired, + "thread.message.created" => AssistantStreamEventDiscriminatorEvent.ThreadMessageCreated, + "thread.message.in_progress" => AssistantStreamEventDiscriminatorEvent.ThreadMessageInProgress, + "thread.message.delta" => AssistantStreamEventDiscriminatorEvent.ThreadMessageDelta, + "thread.message.completed" => AssistantStreamEventDiscriminatorEvent.ThreadMessageCompleted, + "thread.message.incomplete" => AssistantStreamEventDiscriminatorEvent.ThreadMessageIncomplete, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant7.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant10.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant7.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant10.g.cs index f4711d27..e2f14073 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant7.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant10.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run](/docs/api-reference/runs/object) fails. /// - public sealed partial class RunStreamEventVariant7 + public sealed partial class AssistantStreamEventVariant10 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStreamEventVariant7EventJsonConverter))] - public global::OpenAI.RunStreamEventVariant7Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant10EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant10Event Event { get; set; } /// /// Represents an execution run on a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStreamEventVariant7? FromJson( + public static global::OpenAI.AssistantStreamEventVariant10? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStreamEventVariant7), - jsonSerializerContext) as global::OpenAI.RunStreamEventVariant7; + typeof(global::OpenAI.AssistantStreamEventVariant10), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant10; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStreamEventVariant7? FromJson( + public static global::OpenAI.AssistantStreamEventVariant10? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant7Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant10Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant7Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant10Event.g.cs index ab4ec2f4..1a427ce3 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant7Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant10Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStreamEventVariant7Event + public enum AssistantStreamEventVariant10Event { /// /// @@ -17,27 +17,27 @@ public enum RunStreamEventVariant7Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStreamEventVariant7EventExtensions + public static class AssistantStreamEventVariant10EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStreamEventVariant7Event value) + public static string ToValueString(this AssistantStreamEventVariant10Event value) { return value switch { - RunStreamEventVariant7Event.ThreadRunFailed => "thread.run.failed", + AssistantStreamEventVariant10Event.ThreadRunFailed => "thread.run.failed", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStreamEventVariant7Event? ToEnum(string value) + public static AssistantStreamEventVariant10Event? ToEnum(string value) { return value switch { - "thread.run.failed" => RunStreamEventVariant7Event.ThreadRunFailed, + "thread.run.failed" => AssistantStreamEventVariant10Event.ThreadRunFailed, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant8.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant11.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant8.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant11.g.cs index 86076dff..6f23b1d7 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant8.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant11.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `cancelling` status. /// - public sealed partial class RunStreamEventVariant8 + public sealed partial class AssistantStreamEventVariant11 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStreamEventVariant8EventJsonConverter))] - public global::OpenAI.RunStreamEventVariant8Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant11EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant11Event Event { get; set; } /// /// Represents an execution run on a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStreamEventVariant8? FromJson( + public static global::OpenAI.AssistantStreamEventVariant11? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStreamEventVariant8), - jsonSerializerContext) as global::OpenAI.RunStreamEventVariant8; + typeof(global::OpenAI.AssistantStreamEventVariant11), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant11; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStreamEventVariant8? FromJson( + public static global::OpenAI.AssistantStreamEventVariant11? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant8Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant11Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant8Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant11Event.g.cs index 56c0d4a1..cf644171 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant8Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant11Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStreamEventVariant8Event + public enum AssistantStreamEventVariant11Event { /// /// @@ -17,27 +17,27 @@ public enum RunStreamEventVariant8Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStreamEventVariant8EventExtensions + public static class AssistantStreamEventVariant11EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStreamEventVariant8Event value) + public static string ToValueString(this AssistantStreamEventVariant11Event value) { return value switch { - RunStreamEventVariant8Event.ThreadRunCancelling => "thread.run.cancelling", + AssistantStreamEventVariant11Event.ThreadRunCancelling => "thread.run.cancelling", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStreamEventVariant8Event? ToEnum(string value) + public static AssistantStreamEventVariant11Event? ToEnum(string value) { return value switch { - "thread.run.cancelling" => RunStreamEventVariant8Event.ThreadRunCancelling, + "thread.run.cancelling" => AssistantStreamEventVariant11Event.ThreadRunCancelling, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant9.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant12.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant9.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant12.g.cs index 816d398c..05dc620d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant9.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant12.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run](/docs/api-reference/runs/object) is cancelled. /// - public sealed partial class RunStreamEventVariant9 + public sealed partial class AssistantStreamEventVariant12 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStreamEventVariant9EventJsonConverter))] - public global::OpenAI.RunStreamEventVariant9Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant12EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant12Event Event { get; set; } /// /// Represents an execution run on a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStreamEventVariant9? FromJson( + public static global::OpenAI.AssistantStreamEventVariant12? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStreamEventVariant9), - jsonSerializerContext) as global::OpenAI.RunStreamEventVariant9; + typeof(global::OpenAI.AssistantStreamEventVariant12), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant12; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStreamEventVariant9? FromJson( + public static global::OpenAI.AssistantStreamEventVariant12? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant9Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant12Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant9Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant12Event.g.cs index 277bebab..a2a36387 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant9Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant12Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStreamEventVariant9Event + public enum AssistantStreamEventVariant12Event { /// /// @@ -17,27 +17,27 @@ public enum RunStreamEventVariant9Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStreamEventVariant9EventExtensions + public static class AssistantStreamEventVariant12EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStreamEventVariant9Event value) + public static string ToValueString(this AssistantStreamEventVariant12Event value) { return value switch { - RunStreamEventVariant9Event.ThreadRunCancelled => "thread.run.cancelled", + AssistantStreamEventVariant12Event.ThreadRunCancelled => "thread.run.cancelled", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStreamEventVariant9Event? ToEnum(string value) + public static AssistantStreamEventVariant12Event? ToEnum(string value) { return value switch { - "thread.run.cancelled" => RunStreamEventVariant9Event.ThreadRunCancelled, + "thread.run.cancelled" => AssistantStreamEventVariant12Event.ThreadRunCancelled, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant10.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant13.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant10.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant13.g.cs index 44c635be..b9833ecb 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant10.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant13.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run](/docs/api-reference/runs/object) expires. /// - public sealed partial class RunStreamEventVariant10 + public sealed partial class AssistantStreamEventVariant13 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStreamEventVariant10EventJsonConverter))] - public global::OpenAI.RunStreamEventVariant10Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant13EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant13Event Event { get; set; } /// /// Represents an execution run on a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStreamEventVariant10? FromJson( + public static global::OpenAI.AssistantStreamEventVariant13? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStreamEventVariant10), - jsonSerializerContext) as global::OpenAI.RunStreamEventVariant10; + typeof(global::OpenAI.AssistantStreamEventVariant13), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant13; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStreamEventVariant10? FromJson( + public static global::OpenAI.AssistantStreamEventVariant13? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant10Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant13Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant10Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant13Event.g.cs index ce888cad..a2067a69 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant10Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant13Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStreamEventVariant10Event + public enum AssistantStreamEventVariant13Event { /// /// @@ -17,27 +17,27 @@ public enum RunStreamEventVariant10Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStreamEventVariant10EventExtensions + public static class AssistantStreamEventVariant13EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStreamEventVariant10Event value) + public static string ToValueString(this AssistantStreamEventVariant13Event value) { return value switch { - RunStreamEventVariant10Event.ThreadRunExpired => "thread.run.expired", + AssistantStreamEventVariant13Event.ThreadRunExpired => "thread.run.expired", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStreamEventVariant10Event? ToEnum(string value) + public static AssistantStreamEventVariant13Event? ToEnum(string value) { return value switch { - "thread.run.expired" => RunStreamEventVariant10Event.ThreadRunExpired, + "thread.run.expired" => AssistantStreamEventVariant13Event.ThreadRunExpired, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant1.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant14.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant1.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant14.g.cs index b40a9775..aef93468 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant1.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant14.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is created. /// - public sealed partial class RunStepStreamEventVariant1 + public sealed partial class AssistantStreamEventVariant14 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant1EventJsonConverter))] - public global::OpenAI.RunStepStreamEventVariant1Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant14EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant14Event Event { get; set; } /// /// Represents a step in execution of a run. @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStepStreamEventVariant1? FromJson( + public static global::OpenAI.AssistantStreamEventVariant14? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStepStreamEventVariant1), - jsonSerializerContext) as global::OpenAI.RunStepStreamEventVariant1; + typeof(global::OpenAI.AssistantStreamEventVariant14), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant14; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStepStreamEventVariant1? FromJson( + public static global::OpenAI.AssistantStreamEventVariant14? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant1Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant14Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant1Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant14Event.g.cs index 3c1a18da..2fee0a6d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant1Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant14Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStepStreamEventVariant1Event + public enum AssistantStreamEventVariant14Event { /// /// @@ -17,27 +17,27 @@ public enum RunStepStreamEventVariant1Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStepStreamEventVariant1EventExtensions + public static class AssistantStreamEventVariant14EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStepStreamEventVariant1Event value) + public static string ToValueString(this AssistantStreamEventVariant14Event value) { return value switch { - RunStepStreamEventVariant1Event.ThreadRunStepCreated => "thread.run.step.created", + AssistantStreamEventVariant14Event.ThreadRunStepCreated => "thread.run.step.created", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStepStreamEventVariant1Event? ToEnum(string value) + public static AssistantStreamEventVariant14Event? ToEnum(string value) { return value switch { - "thread.run.step.created" => RunStepStreamEventVariant1Event.ThreadRunStepCreated, + "thread.run.step.created" => AssistantStreamEventVariant14Event.ThreadRunStepCreated, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant2.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant15.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant2.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant15.g.cs index 208cce82..2462cb7d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant2.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant15.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. /// - public sealed partial class RunStepStreamEventVariant2 + public sealed partial class AssistantStreamEventVariant15 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant2EventJsonConverter))] - public global::OpenAI.RunStepStreamEventVariant2Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant15EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant15Event Event { get; set; } /// /// Represents a step in execution of a run. @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStepStreamEventVariant2? FromJson( + public static global::OpenAI.AssistantStreamEventVariant15? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStepStreamEventVariant2), - jsonSerializerContext) as global::OpenAI.RunStepStreamEventVariant2; + typeof(global::OpenAI.AssistantStreamEventVariant15), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant15; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStepStreamEventVariant2? FromJson( + public static global::OpenAI.AssistantStreamEventVariant15? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant2Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant15Event.g.cs similarity index 60% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant2Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant15Event.g.cs index a59e9f79..ed181db5 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant2Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant15Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStepStreamEventVariant2Event + public enum AssistantStreamEventVariant15Event { /// /// @@ -17,27 +17,27 @@ public enum RunStepStreamEventVariant2Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStepStreamEventVariant2EventExtensions + public static class AssistantStreamEventVariant15EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStepStreamEventVariant2Event value) + public static string ToValueString(this AssistantStreamEventVariant15Event value) { return value switch { - RunStepStreamEventVariant2Event.ThreadRunStepInProgress => "thread.run.step.in_progress", + AssistantStreamEventVariant15Event.ThreadRunStepInProgress => "thread.run.step.in_progress", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStepStreamEventVariant2Event? ToEnum(string value) + public static AssistantStreamEventVariant15Event? ToEnum(string value) { return value switch { - "thread.run.step.in_progress" => RunStepStreamEventVariant2Event.ThreadRunStepInProgress, + "thread.run.step.in_progress" => AssistantStreamEventVariant15Event.ThreadRunStepInProgress, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant3.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant16.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant3.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant16.g.cs index bdf1e17f..082f55f9 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant3.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant16.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when parts of a [run step](/docs/api-reference/run-steps/step-object) are being streamed. /// - public sealed partial class RunStepStreamEventVariant3 + public sealed partial class AssistantStreamEventVariant16 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant3EventJsonConverter))] - public global::OpenAI.RunStepStreamEventVariant3Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant16EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant16Event Event { get; set; } /// /// Represents a run step delta i.e. any changed fields on a run step during streaming. @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStepStreamEventVariant3? FromJson( + public static global::OpenAI.AssistantStreamEventVariant16? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStepStreamEventVariant3), - jsonSerializerContext) as global::OpenAI.RunStepStreamEventVariant3; + typeof(global::OpenAI.AssistantStreamEventVariant16), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant16; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStepStreamEventVariant3? FromJson( + public static global::OpenAI.AssistantStreamEventVariant16? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant3Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant16Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant3Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant16Event.g.cs index ea3ed144..3169078e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant3Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant16Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStepStreamEventVariant3Event + public enum AssistantStreamEventVariant16Event { /// /// @@ -17,27 +17,27 @@ public enum RunStepStreamEventVariant3Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStepStreamEventVariant3EventExtensions + public static class AssistantStreamEventVariant16EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStepStreamEventVariant3Event value) + public static string ToValueString(this AssistantStreamEventVariant16Event value) { return value switch { - RunStepStreamEventVariant3Event.ThreadRunStepDelta => "thread.run.step.delta", + AssistantStreamEventVariant16Event.ThreadRunStepDelta => "thread.run.step.delta", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStepStreamEventVariant3Event? ToEnum(string value) + public static AssistantStreamEventVariant16Event? ToEnum(string value) { return value switch { - "thread.run.step.delta" => RunStepStreamEventVariant3Event.ThreadRunStepDelta, + "thread.run.step.delta" => AssistantStreamEventVariant16Event.ThreadRunStepDelta, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant4.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant17.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant4.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant17.g.cs index 80dd0544..6df605ca 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant4.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant17.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is completed. /// - public sealed partial class RunStepStreamEventVariant4 + public sealed partial class AssistantStreamEventVariant17 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant4EventJsonConverter))] - public global::OpenAI.RunStepStreamEventVariant4Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant17EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant17Event Event { get; set; } /// /// Represents a step in execution of a run. @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStepStreamEventVariant4? FromJson( + public static global::OpenAI.AssistantStreamEventVariant17? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStepStreamEventVariant4), - jsonSerializerContext) as global::OpenAI.RunStepStreamEventVariant4; + typeof(global::OpenAI.AssistantStreamEventVariant17), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant17; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStepStreamEventVariant4? FromJson( + public static global::OpenAI.AssistantStreamEventVariant17? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant4Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant17Event.g.cs similarity index 60% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant4Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant17Event.g.cs index d1bd39b1..b431dcb9 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant4Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant17Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStepStreamEventVariant4Event + public enum AssistantStreamEventVariant17Event { /// /// @@ -17,27 +17,27 @@ public enum RunStepStreamEventVariant4Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStepStreamEventVariant4EventExtensions + public static class AssistantStreamEventVariant17EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStepStreamEventVariant4Event value) + public static string ToValueString(this AssistantStreamEventVariant17Event value) { return value switch { - RunStepStreamEventVariant4Event.ThreadRunStepCompleted => "thread.run.step.completed", + AssistantStreamEventVariant17Event.ThreadRunStepCompleted => "thread.run.step.completed", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStepStreamEventVariant4Event? ToEnum(string value) + public static AssistantStreamEventVariant17Event? ToEnum(string value) { return value switch { - "thread.run.step.completed" => RunStepStreamEventVariant4Event.ThreadRunStepCompleted, + "thread.run.step.completed" => AssistantStreamEventVariant17Event.ThreadRunStepCompleted, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant5.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant18.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant5.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant18.g.cs index b1597c5f..2f5c4455 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant5.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant18.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) fails. /// - public sealed partial class RunStepStreamEventVariant5 + public sealed partial class AssistantStreamEventVariant18 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant5EventJsonConverter))] - public global::OpenAI.RunStepStreamEventVariant5Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant18EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant18Event Event { get; set; } /// /// Represents a step in execution of a run. @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStepStreamEventVariant5? FromJson( + public static global::OpenAI.AssistantStreamEventVariant18? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStepStreamEventVariant5), - jsonSerializerContext) as global::OpenAI.RunStepStreamEventVariant5; + typeof(global::OpenAI.AssistantStreamEventVariant18), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant18; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStepStreamEventVariant5? FromJson( + public static global::OpenAI.AssistantStreamEventVariant18? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant5Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant18Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant5Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant18Event.g.cs index 61e92f23..d1d63915 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant5Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant18Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStepStreamEventVariant5Event + public enum AssistantStreamEventVariant18Event { /// /// @@ -17,27 +17,27 @@ public enum RunStepStreamEventVariant5Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStepStreamEventVariant5EventExtensions + public static class AssistantStreamEventVariant18EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStepStreamEventVariant5Event value) + public static string ToValueString(this AssistantStreamEventVariant18Event value) { return value switch { - RunStepStreamEventVariant5Event.ThreadRunStepFailed => "thread.run.step.failed", + AssistantStreamEventVariant18Event.ThreadRunStepFailed => "thread.run.step.failed", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStepStreamEventVariant5Event? ToEnum(string value) + public static AssistantStreamEventVariant18Event? ToEnum(string value) { return value switch { - "thread.run.step.failed" => RunStepStreamEventVariant5Event.ThreadRunStepFailed, + "thread.run.step.failed" => AssistantStreamEventVariant18Event.ThreadRunStepFailed, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant6.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant19.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant6.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant19.g.cs index 90783c22..4ff4f9b2 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant6.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant19.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is cancelled. /// - public sealed partial class RunStepStreamEventVariant6 + public sealed partial class AssistantStreamEventVariant19 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant6EventJsonConverter))] - public global::OpenAI.RunStepStreamEventVariant6Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant19EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant19Event Event { get; set; } /// /// Represents a step in execution of a run. @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStepStreamEventVariant6? FromJson( + public static global::OpenAI.AssistantStreamEventVariant19? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStepStreamEventVariant6), - jsonSerializerContext) as global::OpenAI.RunStepStreamEventVariant6; + typeof(global::OpenAI.AssistantStreamEventVariant19), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant19; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStepStreamEventVariant6? FromJson( + public static global::OpenAI.AssistantStreamEventVariant19? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant6Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant19Event.g.cs similarity index 60% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant6Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant19Event.g.cs index 29085a95..d9460a62 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant6Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant19Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStepStreamEventVariant6Event + public enum AssistantStreamEventVariant19Event { /// /// @@ -17,27 +17,27 @@ public enum RunStepStreamEventVariant6Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStepStreamEventVariant6EventExtensions + public static class AssistantStreamEventVariant19EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStepStreamEventVariant6Event value) + public static string ToValueString(this AssistantStreamEventVariant19Event value) { return value switch { - RunStepStreamEventVariant6Event.ThreadRunStepCancelled => "thread.run.step.cancelled", + AssistantStreamEventVariant19Event.ThreadRunStepCancelled => "thread.run.step.cancelled", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStepStreamEventVariant6Event? ToEnum(string value) + public static AssistantStreamEventVariant19Event? ToEnum(string value) { return value switch { - "thread.run.step.cancelled" => RunStepStreamEventVariant6Event.ThreadRunStepCancelled, + "thread.run.step.cancelled" => AssistantStreamEventVariant19Event.ThreadRunStepCancelled, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant7.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant20.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant7.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant20.g.cs index 7d932d7f..1d718795 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant7.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant20.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) expires. /// - public sealed partial class RunStepStreamEventVariant7 + public sealed partial class AssistantStreamEventVariant20 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepStreamEventVariant7EventJsonConverter))] - public global::OpenAI.RunStepStreamEventVariant7Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant20EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant20Event Event { get; set; } /// /// Represents a step in execution of a run. @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStepStreamEventVariant7? FromJson( + public static global::OpenAI.AssistantStreamEventVariant20? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStepStreamEventVariant7), - jsonSerializerContext) as global::OpenAI.RunStepStreamEventVariant7; + typeof(global::OpenAI.AssistantStreamEventVariant20), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant20; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStepStreamEventVariant7? FromJson( + public static global::OpenAI.AssistantStreamEventVariant20? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant7Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant20Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant7Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant20Event.g.cs index 6f697e44..4601cd1e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEventVariant7Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant20Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStepStreamEventVariant7Event + public enum AssistantStreamEventVariant20Event { /// /// @@ -17,27 +17,27 @@ public enum RunStepStreamEventVariant7Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStepStreamEventVariant7EventExtensions + public static class AssistantStreamEventVariant20EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStepStreamEventVariant7Event value) + public static string ToValueString(this AssistantStreamEventVariant20Event value) { return value switch { - RunStepStreamEventVariant7Event.ThreadRunStepExpired => "thread.run.step.expired", + AssistantStreamEventVariant20Event.ThreadRunStepExpired => "thread.run.step.expired", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStepStreamEventVariant7Event? ToEnum(string value) + public static AssistantStreamEventVariant20Event? ToEnum(string value) { return value switch { - "thread.run.step.expired" => RunStepStreamEventVariant7Event.ThreadRunStepExpired, + "thread.run.step.expired" => AssistantStreamEventVariant20Event.ThreadRunStepExpired, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant1.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant21.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant1.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant21.g.cs index daccb749..7a71c94e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant1.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant21.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [message](/docs/api-reference/messages/object) is created. /// - public sealed partial class MessageStreamEventVariant1 + public sealed partial class AssistantStreamEventVariant21 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant1EventJsonConverter))] - public global::OpenAI.MessageStreamEventVariant1Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant21EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant21Event Event { get; set; } /// /// Represents a message within a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.MessageStreamEventVariant1? FromJson( + public static global::OpenAI.AssistantStreamEventVariant21? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.MessageStreamEventVariant1), - jsonSerializerContext) as global::OpenAI.MessageStreamEventVariant1; + typeof(global::OpenAI.AssistantStreamEventVariant21), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant21; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.MessageStreamEventVariant1? FromJson( + public static global::OpenAI.AssistantStreamEventVariant21? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant1Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant21Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant1Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant21Event.g.cs index 86cbf383..4ec858b6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant1Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant21Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum MessageStreamEventVariant1Event + public enum AssistantStreamEventVariant21Event { /// /// @@ -17,27 +17,27 @@ public enum MessageStreamEventVariant1Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class MessageStreamEventVariant1EventExtensions + public static class AssistantStreamEventVariant21EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this MessageStreamEventVariant1Event value) + public static string ToValueString(this AssistantStreamEventVariant21Event value) { return value switch { - MessageStreamEventVariant1Event.ThreadMessageCreated => "thread.message.created", + AssistantStreamEventVariant21Event.ThreadMessageCreated => "thread.message.created", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static MessageStreamEventVariant1Event? ToEnum(string value) + public static AssistantStreamEventVariant21Event? ToEnum(string value) { return value switch { - "thread.message.created" => MessageStreamEventVariant1Event.ThreadMessageCreated, + "thread.message.created" => AssistantStreamEventVariant21Event.ThreadMessageCreated, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant2.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant22.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant2.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant22.g.cs index d55f6a06..4a2fc8eb 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant2.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant22.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [message](/docs/api-reference/messages/object) moves to an `in_progress` state. /// - public sealed partial class MessageStreamEventVariant2 + public sealed partial class AssistantStreamEventVariant22 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant2EventJsonConverter))] - public global::OpenAI.MessageStreamEventVariant2Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant22EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant22Event Event { get; set; } /// /// Represents a message within a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.MessageStreamEventVariant2? FromJson( + public static global::OpenAI.AssistantStreamEventVariant22? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.MessageStreamEventVariant2), - jsonSerializerContext) as global::OpenAI.MessageStreamEventVariant2; + typeof(global::OpenAI.AssistantStreamEventVariant22), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant22; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.MessageStreamEventVariant2? FromJson( + public static global::OpenAI.AssistantStreamEventVariant22? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant2Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant22Event.g.cs similarity index 60% rename from src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant2Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant22Event.g.cs index 839b9b2b..dfad5ebd 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant2Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant22Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum MessageStreamEventVariant2Event + public enum AssistantStreamEventVariant22Event { /// /// @@ -17,27 +17,27 @@ public enum MessageStreamEventVariant2Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class MessageStreamEventVariant2EventExtensions + public static class AssistantStreamEventVariant22EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this MessageStreamEventVariant2Event value) + public static string ToValueString(this AssistantStreamEventVariant22Event value) { return value switch { - MessageStreamEventVariant2Event.ThreadMessageInProgress => "thread.message.in_progress", + AssistantStreamEventVariant22Event.ThreadMessageInProgress => "thread.message.in_progress", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static MessageStreamEventVariant2Event? ToEnum(string value) + public static AssistantStreamEventVariant22Event? ToEnum(string value) { return value switch { - "thread.message.in_progress" => MessageStreamEventVariant2Event.ThreadMessageInProgress, + "thread.message.in_progress" => AssistantStreamEventVariant22Event.ThreadMessageInProgress, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant3.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant23.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant3.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant23.g.cs index 41114c90..54dc4a12 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant3.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant23.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when parts of a [Message](/docs/api-reference/messages/object) are being streamed. /// - public sealed partial class MessageStreamEventVariant3 + public sealed partial class AssistantStreamEventVariant23 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant3EventJsonConverter))] - public global::OpenAI.MessageStreamEventVariant3Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant23EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant23Event Event { get; set; } /// /// Represents a message delta i.e. any changed fields on a message during streaming. @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.MessageStreamEventVariant3? FromJson( + public static global::OpenAI.AssistantStreamEventVariant23? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.MessageStreamEventVariant3), - jsonSerializerContext) as global::OpenAI.MessageStreamEventVariant3; + typeof(global::OpenAI.AssistantStreamEventVariant23), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant23; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.MessageStreamEventVariant3? FromJson( + public static global::OpenAI.AssistantStreamEventVariant23? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant3Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant23Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant3Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant23Event.g.cs index 26a0cd17..94e8384a 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant3Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant23Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum MessageStreamEventVariant3Event + public enum AssistantStreamEventVariant23Event { /// /// @@ -17,27 +17,27 @@ public enum MessageStreamEventVariant3Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class MessageStreamEventVariant3EventExtensions + public static class AssistantStreamEventVariant23EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this MessageStreamEventVariant3Event value) + public static string ToValueString(this AssistantStreamEventVariant23Event value) { return value switch { - MessageStreamEventVariant3Event.ThreadMessageDelta => "thread.message.delta", + AssistantStreamEventVariant23Event.ThreadMessageDelta => "thread.message.delta", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static MessageStreamEventVariant3Event? ToEnum(string value) + public static AssistantStreamEventVariant23Event? ToEnum(string value) { return value switch { - "thread.message.delta" => MessageStreamEventVariant3Event.ThreadMessageDelta, + "thread.message.delta" => AssistantStreamEventVariant23Event.ThreadMessageDelta, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant4.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant24.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant4.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant24.g.cs index 2f4626a4..9ae569d1 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant4.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant24.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [message](/docs/api-reference/messages/object) is completed. /// - public sealed partial class MessageStreamEventVariant4 + public sealed partial class AssistantStreamEventVariant24 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant4EventJsonConverter))] - public global::OpenAI.MessageStreamEventVariant4Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant24EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant24Event Event { get; set; } /// /// Represents a message within a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.MessageStreamEventVariant4? FromJson( + public static global::OpenAI.AssistantStreamEventVariant24? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.MessageStreamEventVariant4), - jsonSerializerContext) as global::OpenAI.MessageStreamEventVariant4; + typeof(global::OpenAI.AssistantStreamEventVariant24), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant24; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.MessageStreamEventVariant4? FromJson( + public static global::OpenAI.AssistantStreamEventVariant24? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant4Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant24Event.g.cs similarity index 60% rename from src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant4Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant24Event.g.cs index d5da27ac..0f2d5f4a 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant4Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant24Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum MessageStreamEventVariant4Event + public enum AssistantStreamEventVariant24Event { /// /// @@ -17,27 +17,27 @@ public enum MessageStreamEventVariant4Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class MessageStreamEventVariant4EventExtensions + public static class AssistantStreamEventVariant24EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this MessageStreamEventVariant4Event value) + public static string ToValueString(this AssistantStreamEventVariant24Event value) { return value switch { - MessageStreamEventVariant4Event.ThreadMessageCompleted => "thread.message.completed", + AssistantStreamEventVariant24Event.ThreadMessageCompleted => "thread.message.completed", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static MessageStreamEventVariant4Event? ToEnum(string value) + public static AssistantStreamEventVariant24Event? ToEnum(string value) { return value switch { - "thread.message.completed" => MessageStreamEventVariant4Event.ThreadMessageCompleted, + "thread.message.completed" => AssistantStreamEventVariant24Event.ThreadMessageCompleted, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant5.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant25.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant5.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant25.g.cs index f319bbf0..d4a87f06 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant5.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant25.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [message](/docs/api-reference/messages/object) ends before it is completed. /// - public sealed partial class MessageStreamEventVariant5 + public sealed partial class AssistantStreamEventVariant25 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.MessageStreamEventVariant5EventJsonConverter))] - public global::OpenAI.MessageStreamEventVariant5Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant25EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant25Event Event { get; set; } /// /// Represents a message within a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.MessageStreamEventVariant5? FromJson( + public static global::OpenAI.AssistantStreamEventVariant25? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.MessageStreamEventVariant5), - jsonSerializerContext) as global::OpenAI.MessageStreamEventVariant5; + typeof(global::OpenAI.AssistantStreamEventVariant25), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant25; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.MessageStreamEventVariant5? FromJson( + public static global::OpenAI.AssistantStreamEventVariant25? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant5Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant25Event.g.cs similarity index 60% rename from src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant5Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant25Event.g.cs index c53af9b9..c6e50c3d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEventVariant5Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant25Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum MessageStreamEventVariant5Event + public enum AssistantStreamEventVariant25Event { /// /// @@ -17,27 +17,27 @@ public enum MessageStreamEventVariant5Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class MessageStreamEventVariant5EventExtensions + public static class AssistantStreamEventVariant25EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this MessageStreamEventVariant5Event value) + public static string ToValueString(this AssistantStreamEventVariant25Event value) { return value switch { - MessageStreamEventVariant5Event.ThreadMessageIncomplete => "thread.message.incomplete", + AssistantStreamEventVariant25Event.ThreadMessageIncomplete => "thread.message.incomplete", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static MessageStreamEventVariant5Event? ToEnum(string value) + public static AssistantStreamEventVariant25Event? ToEnum(string value) { return value switch { - "thread.message.incomplete" => MessageStreamEventVariant5Event.ThreadMessageIncomplete, + "thread.message.incomplete" => AssistantStreamEventVariant25Event.ThreadMessageIncomplete, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ThreadStreamEventVariant1.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant3.g.cs similarity index 87% rename from src/libs/OpenAI/Generated/OpenAI.Models.ThreadStreamEventVariant1.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant3.g.cs index 4025b394..efc62d43 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.ThreadStreamEventVariant1.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant3.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// Occurs when a new [thread](/docs/api-reference/threads/object) is created. /// - public sealed partial class ThreadStreamEventVariant1 + public sealed partial class AssistantStreamEventVariant3 { /// /// Whether to enable input audio transcription. @@ -18,8 +18,8 @@ public sealed partial class ThreadStreamEventVariant1 /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.ThreadStreamEventVariant1EventJsonConverter))] - public global::OpenAI.ThreadStreamEventVariant1Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant3EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant3Event Event { get; set; } /// /// Represents a thread that contains [messages](/docs/api-reference/messages). @@ -65,14 +65,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.ThreadStreamEventVariant1? FromJson( + public static global::OpenAI.AssistantStreamEventVariant3? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.ThreadStreamEventVariant1), - jsonSerializerContext) as global::OpenAI.ThreadStreamEventVariant1; + typeof(global::OpenAI.AssistantStreamEventVariant3), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant3; } /// @@ -82,11 +82,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.ThreadStreamEventVariant1? FromJson( + public static global::OpenAI.AssistantStreamEventVariant3? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ThreadStreamEventVariant1Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant3Event.g.cs similarity index 62% rename from src/libs/OpenAI/Generated/OpenAI.Models.ThreadStreamEventVariant1Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant3Event.g.cs index fa5fc3ac..754e5f2c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.ThreadStreamEventVariant1Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant3Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum ThreadStreamEventVariant1Event + public enum AssistantStreamEventVariant3Event { /// /// @@ -17,27 +17,27 @@ public enum ThreadStreamEventVariant1Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class ThreadStreamEventVariant1EventExtensions + public static class AssistantStreamEventVariant3EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this ThreadStreamEventVariant1Event value) + public static string ToValueString(this AssistantStreamEventVariant3Event value) { return value switch { - ThreadStreamEventVariant1Event.ThreadCreated => "thread.created", + AssistantStreamEventVariant3Event.ThreadCreated => "thread.created", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static ThreadStreamEventVariant1Event? ToEnum(string value) + public static AssistantStreamEventVariant3Event? ToEnum(string value) { return value switch { - "thread.created" => ThreadStreamEventVariant1Event.ThreadCreated, + "thread.created" => AssistantStreamEventVariant3Event.ThreadCreated, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant1.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant4.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant1.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant4.g.cs index 41d46b59..a63f97bb 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant1.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant4.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a new [run](/docs/api-reference/runs/object) is created. /// - public sealed partial class RunStreamEventVariant1 + public sealed partial class AssistantStreamEventVariant4 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStreamEventVariant1EventJsonConverter))] - public global::OpenAI.RunStreamEventVariant1Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant4EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant4Event Event { get; set; } /// /// Represents an execution run on a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStreamEventVariant1? FromJson( + public static global::OpenAI.AssistantStreamEventVariant4? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStreamEventVariant1), - jsonSerializerContext) as global::OpenAI.RunStreamEventVariant1; + typeof(global::OpenAI.AssistantStreamEventVariant4), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant4; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStreamEventVariant1? FromJson( + public static global::OpenAI.AssistantStreamEventVariant4? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant1Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant4Event.g.cs similarity index 62% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant1Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant4Event.g.cs index 264bac1b..80faaac3 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant1Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant4Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStreamEventVariant1Event + public enum AssistantStreamEventVariant4Event { /// /// @@ -17,27 +17,27 @@ public enum RunStreamEventVariant1Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStreamEventVariant1EventExtensions + public static class AssistantStreamEventVariant4EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStreamEventVariant1Event value) + public static string ToValueString(this AssistantStreamEventVariant4Event value) { return value switch { - RunStreamEventVariant1Event.ThreadRunCreated => "thread.run.created", + AssistantStreamEventVariant4Event.ThreadRunCreated => "thread.run.created", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStreamEventVariant1Event? ToEnum(string value) + public static AssistantStreamEventVariant4Event? ToEnum(string value) { return value switch { - "thread.run.created" => RunStreamEventVariant1Event.ThreadRunCreated, + "thread.run.created" => AssistantStreamEventVariant4Event.ThreadRunCreated, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant2.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant5.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant2.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant5.g.cs index 9ae5f8ec..d244f292 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant2.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant5.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `queued` status. /// - public sealed partial class RunStreamEventVariant2 + public sealed partial class AssistantStreamEventVariant5 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStreamEventVariant2EventJsonConverter))] - public global::OpenAI.RunStreamEventVariant2Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant5EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant5Event Event { get; set; } /// /// Represents an execution run on a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStreamEventVariant2? FromJson( + public static global::OpenAI.AssistantStreamEventVariant5? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStreamEventVariant2), - jsonSerializerContext) as global::OpenAI.RunStreamEventVariant2; + typeof(global::OpenAI.AssistantStreamEventVariant5), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant5; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStreamEventVariant2? FromJson( + public static global::OpenAI.AssistantStreamEventVariant5? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant2Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant5Event.g.cs similarity index 62% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant2Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant5Event.g.cs index 5729bbb6..64661832 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant2Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant5Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStreamEventVariant2Event + public enum AssistantStreamEventVariant5Event { /// /// @@ -17,27 +17,27 @@ public enum RunStreamEventVariant2Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStreamEventVariant2EventExtensions + public static class AssistantStreamEventVariant5EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStreamEventVariant2Event value) + public static string ToValueString(this AssistantStreamEventVariant5Event value) { return value switch { - RunStreamEventVariant2Event.ThreadRunQueued => "thread.run.queued", + AssistantStreamEventVariant5Event.ThreadRunQueued => "thread.run.queued", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStreamEventVariant2Event? ToEnum(string value) + public static AssistantStreamEventVariant5Event? ToEnum(string value) { return value switch { - "thread.run.queued" => RunStreamEventVariant2Event.ThreadRunQueued, + "thread.run.queued" => AssistantStreamEventVariant5Event.ThreadRunQueued, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant3.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant6.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant3.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant6.g.cs index 7065bbcc..8ec78a10 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant3.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant6.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to an `in_progress` status. /// - public sealed partial class RunStreamEventVariant3 + public sealed partial class AssistantStreamEventVariant6 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStreamEventVariant3EventJsonConverter))] - public global::OpenAI.RunStreamEventVariant3Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant6EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant6Event Event { get; set; } /// /// Represents an execution run on a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStreamEventVariant3? FromJson( + public static global::OpenAI.AssistantStreamEventVariant6? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStreamEventVariant3), - jsonSerializerContext) as global::OpenAI.RunStreamEventVariant3; + typeof(global::OpenAI.AssistantStreamEventVariant6), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant6; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStreamEventVariant3? FromJson( + public static global::OpenAI.AssistantStreamEventVariant6? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant3Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant6Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant3Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant6Event.g.cs index 422bd04a..2d0d3155 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant3Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant6Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStreamEventVariant3Event + public enum AssistantStreamEventVariant6Event { /// /// @@ -17,27 +17,27 @@ public enum RunStreamEventVariant3Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStreamEventVariant3EventExtensions + public static class AssistantStreamEventVariant6EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStreamEventVariant3Event value) + public static string ToValueString(this AssistantStreamEventVariant6Event value) { return value switch { - RunStreamEventVariant3Event.ThreadRunInProgress => "thread.run.in_progress", + AssistantStreamEventVariant6Event.ThreadRunInProgress => "thread.run.in_progress", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStreamEventVariant3Event? ToEnum(string value) + public static AssistantStreamEventVariant6Event? ToEnum(string value) { return value switch { - "thread.run.in_progress" => RunStreamEventVariant3Event.ThreadRunInProgress, + "thread.run.in_progress" => AssistantStreamEventVariant6Event.ThreadRunInProgress, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant4.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant7.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant4.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant7.g.cs index 4117544a..25e93681 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant4.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant7.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `requires_action` status. /// - public sealed partial class RunStreamEventVariant4 + public sealed partial class AssistantStreamEventVariant7 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStreamEventVariant4EventJsonConverter))] - public global::OpenAI.RunStreamEventVariant4Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant7EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant7Event Event { get; set; } /// /// Represents an execution run on a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStreamEventVariant4? FromJson( + public static global::OpenAI.AssistantStreamEventVariant7? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStreamEventVariant4), - jsonSerializerContext) as global::OpenAI.RunStreamEventVariant4; + typeof(global::OpenAI.AssistantStreamEventVariant7), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant7; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStreamEventVariant4? FromJson( + public static global::OpenAI.AssistantStreamEventVariant7? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant4Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant7Event.g.cs similarity index 60% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant4Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant7Event.g.cs index 492322d8..94c31423 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant4Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant7Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStreamEventVariant4Event + public enum AssistantStreamEventVariant7Event { /// /// @@ -17,27 +17,27 @@ public enum RunStreamEventVariant4Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStreamEventVariant4EventExtensions + public static class AssistantStreamEventVariant7EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStreamEventVariant4Event value) + public static string ToValueString(this AssistantStreamEventVariant7Event value) { return value switch { - RunStreamEventVariant4Event.ThreadRunRequiresAction => "thread.run.requires_action", + AssistantStreamEventVariant7Event.ThreadRunRequiresAction => "thread.run.requires_action", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStreamEventVariant4Event? ToEnum(string value) + public static AssistantStreamEventVariant7Event? ToEnum(string value) { return value switch { - "thread.run.requires_action" => RunStreamEventVariant4Event.ThreadRunRequiresAction, + "thread.run.requires_action" => AssistantStreamEventVariant7Event.ThreadRunRequiresAction, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant5.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant8.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant5.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant8.g.cs index 3c1be382..38a4d9b0 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant5.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant8.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run](/docs/api-reference/runs/object) is completed. /// - public sealed partial class RunStreamEventVariant5 + public sealed partial class AssistantStreamEventVariant8 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStreamEventVariant5EventJsonConverter))] - public global::OpenAI.RunStreamEventVariant5Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant8EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant8Event Event { get; set; } /// /// Represents an execution run on a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStreamEventVariant5? FromJson( + public static global::OpenAI.AssistantStreamEventVariant8? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStreamEventVariant5), - jsonSerializerContext) as global::OpenAI.RunStreamEventVariant5; + typeof(global::OpenAI.AssistantStreamEventVariant8), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant8; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStreamEventVariant5? FromJson( + public static global::OpenAI.AssistantStreamEventVariant8? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant5Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant8Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant5Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant8Event.g.cs index 23c59195..5805c244 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant5Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant8Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStreamEventVariant5Event + public enum AssistantStreamEventVariant8Event { /// /// @@ -17,27 +17,27 @@ public enum RunStreamEventVariant5Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStreamEventVariant5EventExtensions + public static class AssistantStreamEventVariant8EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStreamEventVariant5Event value) + public static string ToValueString(this AssistantStreamEventVariant8Event value) { return value switch { - RunStreamEventVariant5Event.ThreadRunCompleted => "thread.run.completed", + AssistantStreamEventVariant8Event.ThreadRunCompleted => "thread.run.completed", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStreamEventVariant5Event? ToEnum(string value) + public static AssistantStreamEventVariant8Event? ToEnum(string value) { return value switch { - "thread.run.completed" => RunStreamEventVariant5Event.ThreadRunCompleted, + "thread.run.completed" => AssistantStreamEventVariant8Event.ThreadRunCompleted, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant6.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant9.g.cs similarity index 86% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant6.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant9.g.cs index 60f904f0..15b4eacd 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant6.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant9.g.cs @@ -6,14 +6,14 @@ namespace OpenAI /// /// Occurs when a [run](/docs/api-reference/runs/object) ends with status `incomplete`. /// - public sealed partial class RunStreamEventVariant6 + public sealed partial class AssistantStreamEventVariant9 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStreamEventVariant6EventJsonConverter))] - public global::OpenAI.RunStreamEventVariant6Event Event { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.AssistantStreamEventVariant9EventJsonConverter))] + public global::OpenAI.AssistantStreamEventVariant9Event Event { get; set; } /// /// Represents an execution run on a [thread](/docs/api-reference/threads). @@ -59,14 +59,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.RunStreamEventVariant6? FromJson( + public static global::OpenAI.AssistantStreamEventVariant9? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.RunStreamEventVariant6), - jsonSerializerContext) as global::OpenAI.RunStreamEventVariant6; + typeof(global::OpenAI.AssistantStreamEventVariant9), + jsonSerializerContext) as global::OpenAI.AssistantStreamEventVariant9; } /// @@ -76,11 +76,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.RunStreamEventVariant6? FromJson( + public static global::OpenAI.AssistantStreamEventVariant9? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant6Event.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant9Event.g.cs similarity index 61% rename from src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant6Event.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant9Event.g.cs index effc8769..eb7aeaa6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEventVariant6Event.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.AssistantStreamEventVariant9Event.g.cs @@ -6,7 +6,7 @@ namespace OpenAI /// /// /// - public enum RunStreamEventVariant6Event + public enum AssistantStreamEventVariant9Event { /// /// @@ -17,27 +17,27 @@ public enum RunStreamEventVariant6Event /// /// Enum extensions to do fast conversions without the reflection. /// - public static class RunStreamEventVariant6EventExtensions + public static class AssistantStreamEventVariant9EventExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this RunStreamEventVariant6Event value) + public static string ToValueString(this AssistantStreamEventVariant9Event value) { return value switch { - RunStreamEventVariant6Event.ThreadRunIncomplete => "thread.run.incomplete", + AssistantStreamEventVariant9Event.ThreadRunIncomplete => "thread.run.incomplete", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static RunStreamEventVariant6Event? ToEnum(string value) + public static AssistantStreamEventVariant9Event? ToEnum(string value) { return value switch { - "thread.run.incomplete" => RunStreamEventVariant6Event.ThreadRunIncomplete, + "thread.run.incomplete" => AssistantStreamEventVariant9Event.ThreadRunIncomplete, _ => null, }; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessageContentPart.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessageContentPart.g.cs index cdcfe691..e36c0d24 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessageContentPart.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessageContentPart.g.cs @@ -10,6 +10,11 @@ namespace OpenAI /// public readonly partial struct ChatCompletionRequestAssistantMessageContentPart : global::System.IEquatable { + /// + /// + /// + public global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType? Type { get; } + /// /// Learn about [text inputs](/docs/guides/text-generation). /// @@ -84,10 +89,13 @@ public ChatCompletionRequestAssistantMessageContentPart(global::OpenAI.ChatCompl /// /// public ChatCompletionRequestAssistantMessageContentPart( + global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType? type, global::OpenAI.ChatCompletionRequestMessageContentPartText? text, global::OpenAI.ChatCompletionRequestMessageContentPartRefusal? refusal ) { + Type = type; + Text = text; Refusal = refusal; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessageContentPartDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessageContentPartDiscriminator.g.cs new file mode 100644 index 00000000..e78256d7 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessageContentPartDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionRequestAssistantMessageContentPartDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeJsonConverter))] + public global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminator), + jsonSerializerContext) as global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.g.cs new file mode 100644 index 00000000..87c7064f --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum ChatCompletionRequestAssistantMessageContentPartDiscriminatorType + { + /// + /// + /// + Text, + /// + /// + /// + Refusal, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatCompletionRequestAssistantMessageContentPartDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatCompletionRequestAssistantMessageContentPartDiscriminatorType value) + { + return value switch + { + ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.Text => "text", + ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.Refusal => "refusal", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatCompletionRequestAssistantMessageContentPartDiscriminatorType? ToEnum(string value) + { + return value switch + { + "text" => ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.Text, + "refusal" => ChatCompletionRequestAssistantMessageContentPartDiscriminatorType.Refusal, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestMessage.g.cs index 438ae9b5..44798379 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestMessage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestMessage.g.cs @@ -13,6 +13,11 @@ namespace OpenAI /// /// /// + public global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole? Role { get; } + + /// + /// + /// #if NET6_0_OR_GREATER public global::OpenAI.ChatCompletionRequestSystemMessage? System { get; init; } #else @@ -189,6 +194,7 @@ public ChatCompletionRequestMessage(global::OpenAI.ChatCompletionRequestFunction /// /// public ChatCompletionRequestMessage( + global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole? role, global::OpenAI.ChatCompletionRequestSystemMessage? system, global::OpenAI.ChatCompletionRequestUserMessage? user, global::OpenAI.ChatCompletionRequestAssistantMessage? assistant, @@ -196,6 +202,8 @@ public ChatCompletionRequestMessage( global::OpenAI.ChatCompletionRequestFunctionMessage? function ) { + Role = role; + System = system; User = user; Assistant = assistant; diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestMessageDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestMessageDiscriminator.g.cs new file mode 100644 index 00000000..49d6056a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestMessageDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionRequestMessageDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.ChatCompletionRequestMessageDiscriminatorRoleJsonConverter))] + public global::OpenAI.ChatCompletionRequestMessageDiscriminatorRole? Role { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ChatCompletionRequestMessageDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ChatCompletionRequestMessageDiscriminator), + jsonSerializerContext) as global::OpenAI.ChatCompletionRequestMessageDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ChatCompletionRequestMessageDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestMessageDiscriminatorRole.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestMessageDiscriminatorRole.g.cs new file mode 100644 index 00000000..7571d707 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestMessageDiscriminatorRole.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum ChatCompletionRequestMessageDiscriminatorRole + { + /// + /// + /// + System, + /// + /// + /// + User, + /// + /// + /// + Assistant, + /// + /// + /// + Tool, + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatCompletionRequestMessageDiscriminatorRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatCompletionRequestMessageDiscriminatorRole value) + { + return value switch + { + ChatCompletionRequestMessageDiscriminatorRole.System => "system", + ChatCompletionRequestMessageDiscriminatorRole.User => "user", + ChatCompletionRequestMessageDiscriminatorRole.Assistant => "assistant", + ChatCompletionRequestMessageDiscriminatorRole.Tool => "tool", + ChatCompletionRequestMessageDiscriminatorRole.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatCompletionRequestMessageDiscriminatorRole? ToEnum(string value) + { + return value switch + { + "system" => ChatCompletionRequestMessageDiscriminatorRole.System, + "user" => ChatCompletionRequestMessageDiscriminatorRole.User, + "assistant" => ChatCompletionRequestMessageDiscriminatorRole.Assistant, + "tool" => ChatCompletionRequestMessageDiscriminatorRole.Tool, + "function" => ChatCompletionRequestMessageDiscriminatorRole.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessageContentPart.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessageContentPart.g.cs index aeae39f6..8ab05066 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessageContentPart.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessageContentPart.g.cs @@ -10,6 +10,11 @@ namespace OpenAI /// public readonly partial struct ChatCompletionRequestUserMessageContentPart : global::System.IEquatable { + /// + /// + /// + public global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType? Type { get; } + /// /// Learn about [text inputs](/docs/guides/text-generation). /// @@ -119,11 +124,14 @@ public ChatCompletionRequestUserMessageContentPart(global::OpenAI.ChatCompletion /// /// public ChatCompletionRequestUserMessageContentPart( + global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType? type, global::OpenAI.ChatCompletionRequestMessageContentPartText? text, global::OpenAI.ChatCompletionRequestMessageContentPartImage? image, global::OpenAI.ChatCompletionRequestMessageContentPartAudio? audio ) { + Type = type; + Text = text; Image = image; Audio = audio; diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminator.g.cs new file mode 100644 index 00000000..202eef1a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionRequestUserMessageContentPartDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.ChatCompletionRequestUserMessageContentPartDiscriminatorTypeJsonConverter))] + public global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator), + jsonSerializerContext) as global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminatorType.g.cs new file mode 100644 index 00000000..4fc42b55 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum ChatCompletionRequestUserMessageContentPartDiscriminatorType + { + /// + /// + /// + Text, + /// + /// + /// + ImageUrl, + /// + /// + /// + InputAudio, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatCompletionRequestUserMessageContentPartDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatCompletionRequestUserMessageContentPartDiscriminatorType value) + { + return value switch + { + ChatCompletionRequestUserMessageContentPartDiscriminatorType.Text => "text", + ChatCompletionRequestUserMessageContentPartDiscriminatorType.ImageUrl => "image_url", + ChatCompletionRequestUserMessageContentPartDiscriminatorType.InputAudio => "input_audio", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatCompletionRequestUserMessageContentPartDiscriminatorType? ToEnum(string value) + { + return value switch + { + "text" => ChatCompletionRequestUserMessageContentPartDiscriminatorType.Text, + "image_url" => ChatCompletionRequestUserMessageContentPartDiscriminatorType.ImageUrl, + "input_audio" => ChatCompletionRequestUserMessageContentPartDiscriminatorType.InputAudio, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChunkingStrategyRequestParam.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChunkingStrategyRequestParam.g.cs index 0e573bc2..4dd6714d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.ChunkingStrategyRequestParam.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChunkingStrategyRequestParam.g.cs @@ -10,6 +10,11 @@ namespace OpenAI /// public readonly partial struct ChunkingStrategyRequestParam : global::System.IEquatable { + /// + /// + /// + public global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType? Type { get; } + /// /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. /// @@ -84,10 +89,13 @@ public ChunkingStrategyRequestParam(global::OpenAI.StaticChunkingStrategyRequest /// /// public ChunkingStrategyRequestParam( + global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType? type, global::OpenAI.AutoChunkingStrategyRequestParam? auto, global::OpenAI.StaticChunkingStrategyRequestParam? @static ) { + Type = type; + Auto = auto; Static = @static; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChunkingStrategyRequestParamDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChunkingStrategyRequestParamDiscriminator.g.cs new file mode 100644 index 00000000..c9f5bc4b --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChunkingStrategyRequestParamDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class ChunkingStrategyRequestParamDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.ChunkingStrategyRequestParamDiscriminatorTypeJsonConverter))] + public global::OpenAI.ChunkingStrategyRequestParamDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ChunkingStrategyRequestParamDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ChunkingStrategyRequestParamDiscriminator), + jsonSerializerContext) as global::OpenAI.ChunkingStrategyRequestParamDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ChunkingStrategyRequestParamDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ChunkingStrategyRequestParamDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ChunkingStrategyRequestParamDiscriminatorType.g.cs new file mode 100644 index 00000000..738a3623 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ChunkingStrategyRequestParamDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum ChunkingStrategyRequestParamDiscriminatorType + { + /// + /// + /// + Auto, + /// + /// + /// + Static, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChunkingStrategyRequestParamDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChunkingStrategyRequestParamDiscriminatorType value) + { + return value switch + { + ChunkingStrategyRequestParamDiscriminatorType.Auto => "auto", + ChunkingStrategyRequestParamDiscriminatorType.Static => "static", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChunkingStrategyRequestParamDiscriminatorType? ToEnum(string value) + { + return value switch + { + "auto" => ChunkingStrategyRequestParamDiscriminatorType.Auto, + "static" => ChunkingStrategyRequestParamDiscriminatorType.Static, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ContentItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ContentItem.g.cs new file mode 100644 index 00000000..4d1eb0c6 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ContentItem.g.cs @@ -0,0 +1,382 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ContentItem : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType? Type { get; } + + /// + /// References an image [File](/docs/api-reference/files) in the content of a message. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageDeltaContentImageFileObject? MessageDeltaImageFileObject { get; init; } +#else + public global::OpenAI.MessageDeltaContentImageFileObject? MessageDeltaImageFileObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaImageFileObject))] +#endif + public bool IsMessageDeltaImageFileObject => MessageDeltaImageFileObject != null; + + /// + /// + /// + public static implicit operator ContentItem(global::OpenAI.MessageDeltaContentImageFileObject value) => new ContentItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageDeltaContentImageFileObject?(ContentItem @this) => @this.MessageDeltaImageFileObject; + + /// + /// + /// + public ContentItem(global::OpenAI.MessageDeltaContentImageFileObject? value) + { + MessageDeltaImageFileObject = value; + } + + /// + /// The text content that is part of a message. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageDeltaContentTextObject? MessageDeltaTextObject { get; init; } +#else + public global::OpenAI.MessageDeltaContentTextObject? MessageDeltaTextObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaTextObject))] +#endif + public bool IsMessageDeltaTextObject => MessageDeltaTextObject != null; + + /// + /// + /// + public static implicit operator ContentItem(global::OpenAI.MessageDeltaContentTextObject value) => new ContentItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageDeltaContentTextObject?(ContentItem @this) => @this.MessageDeltaTextObject; + + /// + /// + /// + public ContentItem(global::OpenAI.MessageDeltaContentTextObject? value) + { + MessageDeltaTextObject = value; + } + + /// + /// The refusal content that is part of a message. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageDeltaContentRefusalObject? MessageDeltaRefusalObject { get; init; } +#else + public global::OpenAI.MessageDeltaContentRefusalObject? MessageDeltaRefusalObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaRefusalObject))] +#endif + public bool IsMessageDeltaRefusalObject => MessageDeltaRefusalObject != null; + + /// + /// + /// + public static implicit operator ContentItem(global::OpenAI.MessageDeltaContentRefusalObject value) => new ContentItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageDeltaContentRefusalObject?(ContentItem @this) => @this.MessageDeltaRefusalObject; + + /// + /// + /// + public ContentItem(global::OpenAI.MessageDeltaContentRefusalObject? value) + { + MessageDeltaRefusalObject = value; + } + + /// + /// References an image URL in the content of a message. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageDeltaContentImageUrlObject? MessageDeltaImageUrlObject { get; init; } +#else + public global::OpenAI.MessageDeltaContentImageUrlObject? MessageDeltaImageUrlObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaImageUrlObject))] +#endif + public bool IsMessageDeltaImageUrlObject => MessageDeltaImageUrlObject != null; + + /// + /// + /// + public static implicit operator ContentItem(global::OpenAI.MessageDeltaContentImageUrlObject value) => new ContentItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageDeltaContentImageUrlObject?(ContentItem @this) => @this.MessageDeltaImageUrlObject; + + /// + /// + /// + public ContentItem(global::OpenAI.MessageDeltaContentImageUrlObject? value) + { + MessageDeltaImageUrlObject = value; + } + + /// + /// + /// + public ContentItem( + global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType? type, + global::OpenAI.MessageDeltaContentImageFileObject? messageDeltaImageFileObject, + global::OpenAI.MessageDeltaContentTextObject? messageDeltaTextObject, + global::OpenAI.MessageDeltaContentRefusalObject? messageDeltaRefusalObject, + global::OpenAI.MessageDeltaContentImageUrlObject? messageDeltaImageUrlObject + ) + { + Type = type; + + MessageDeltaImageFileObject = messageDeltaImageFileObject; + MessageDeltaTextObject = messageDeltaTextObject; + MessageDeltaRefusalObject = messageDeltaRefusalObject; + MessageDeltaImageUrlObject = messageDeltaImageUrlObject; + } + + /// + /// + /// + public object? Object => + MessageDeltaImageUrlObject as object ?? + MessageDeltaRefusalObject as object ?? + MessageDeltaTextObject as object ?? + MessageDeltaImageFileObject as object + ; + + /// + /// + /// + public bool Validate() + { + return IsMessageDeltaImageFileObject && !IsMessageDeltaTextObject && !IsMessageDeltaRefusalObject && !IsMessageDeltaImageUrlObject || !IsMessageDeltaImageFileObject && IsMessageDeltaTextObject && !IsMessageDeltaRefusalObject && !IsMessageDeltaImageUrlObject || !IsMessageDeltaImageFileObject && !IsMessageDeltaTextObject && IsMessageDeltaRefusalObject && !IsMessageDeltaImageUrlObject || !IsMessageDeltaImageFileObject && !IsMessageDeltaTextObject && !IsMessageDeltaRefusalObject && IsMessageDeltaImageUrlObject; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? messageDeltaImageFileObject = null, + global::System.Func? messageDeltaTextObject = null, + global::System.Func? messageDeltaRefusalObject = null, + global::System.Func? messageDeltaImageUrlObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageDeltaImageFileObject && messageDeltaImageFileObject != null) + { + return messageDeltaImageFileObject(MessageDeltaImageFileObject!); + } + else if (IsMessageDeltaTextObject && messageDeltaTextObject != null) + { + return messageDeltaTextObject(MessageDeltaTextObject!); + } + else if (IsMessageDeltaRefusalObject && messageDeltaRefusalObject != null) + { + return messageDeltaRefusalObject(MessageDeltaRefusalObject!); + } + else if (IsMessageDeltaImageUrlObject && messageDeltaImageUrlObject != null) + { + return messageDeltaImageUrlObject(MessageDeltaImageUrlObject!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? messageDeltaImageFileObject = null, + global::System.Action? messageDeltaTextObject = null, + global::System.Action? messageDeltaRefusalObject = null, + global::System.Action? messageDeltaImageUrlObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageDeltaImageFileObject) + { + messageDeltaImageFileObject?.Invoke(MessageDeltaImageFileObject!); + } + else if (IsMessageDeltaTextObject) + { + messageDeltaTextObject?.Invoke(MessageDeltaTextObject!); + } + else if (IsMessageDeltaRefusalObject) + { + messageDeltaRefusalObject?.Invoke(MessageDeltaRefusalObject!); + } + else if (IsMessageDeltaImageUrlObject) + { + messageDeltaImageUrlObject?.Invoke(MessageDeltaImageUrlObject!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + MessageDeltaImageFileObject, + typeof(global::OpenAI.MessageDeltaContentImageFileObject), + MessageDeltaTextObject, + typeof(global::OpenAI.MessageDeltaContentTextObject), + MessageDeltaRefusalObject, + typeof(global::OpenAI.MessageDeltaContentRefusalObject), + MessageDeltaImageUrlObject, + typeof(global::OpenAI.MessageDeltaContentImageUrlObject), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ContentItem other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaImageFileObject, other.MessageDeltaImageFileObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaTextObject, other.MessageDeltaTextObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaRefusalObject, other.MessageDeltaRefusalObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaImageUrlObject, other.MessageDeltaImageUrlObject) + ; + } + + /// + /// + /// + public static bool operator ==(ContentItem obj1, ContentItem obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ContentItem obj1, ContentItem obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ContentItem o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ContentItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ContentItem), + jsonSerializerContext) as global::OpenAI.ContentItem?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ContentItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ContentItem2.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ContentItem2.g.cs new file mode 100644 index 00000000..21ee25c6 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ContentItem2.g.cs @@ -0,0 +1,382 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ContentItem2 : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.MessageObjectContentItemDiscriminatorType? Type { get; } + + /// + /// References an image [File](/docs/api-reference/files) in the content of a message. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageContentImageFileObject? MessageImageFileObject { get; init; } +#else + public global::OpenAI.MessageContentImageFileObject? MessageImageFileObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageFileObject))] +#endif + public bool IsMessageImageFileObject => MessageImageFileObject != null; + + /// + /// + /// + public static implicit operator ContentItem2(global::OpenAI.MessageContentImageFileObject value) => new ContentItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageContentImageFileObject?(ContentItem2 @this) => @this.MessageImageFileObject; + + /// + /// + /// + public ContentItem2(global::OpenAI.MessageContentImageFileObject? value) + { + MessageImageFileObject = value; + } + + /// + /// References an image URL in the content of a message. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageContentImageUrlObject? MessageImageUrlObject { get; init; } +#else + public global::OpenAI.MessageContentImageUrlObject? MessageImageUrlObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageUrlObject))] +#endif + public bool IsMessageImageUrlObject => MessageImageUrlObject != null; + + /// + /// + /// + public static implicit operator ContentItem2(global::OpenAI.MessageContentImageUrlObject value) => new ContentItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageContentImageUrlObject?(ContentItem2 @this) => @this.MessageImageUrlObject; + + /// + /// + /// + public ContentItem2(global::OpenAI.MessageContentImageUrlObject? value) + { + MessageImageUrlObject = value; + } + + /// + /// The text content that is part of a message. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageContentTextObject? MessageTextObject { get; init; } +#else + public global::OpenAI.MessageContentTextObject? MessageTextObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageTextObject))] +#endif + public bool IsMessageTextObject => MessageTextObject != null; + + /// + /// + /// + public static implicit operator ContentItem2(global::OpenAI.MessageContentTextObject value) => new ContentItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageContentTextObject?(ContentItem2 @this) => @this.MessageTextObject; + + /// + /// + /// + public ContentItem2(global::OpenAI.MessageContentTextObject? value) + { + MessageTextObject = value; + } + + /// + /// The refusal content generated by the assistant. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageContentRefusalObject? MessageRefusalObject { get; init; } +#else + public global::OpenAI.MessageContentRefusalObject? MessageRefusalObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageRefusalObject))] +#endif + public bool IsMessageRefusalObject => MessageRefusalObject != null; + + /// + /// + /// + public static implicit operator ContentItem2(global::OpenAI.MessageContentRefusalObject value) => new ContentItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageContentRefusalObject?(ContentItem2 @this) => @this.MessageRefusalObject; + + /// + /// + /// + public ContentItem2(global::OpenAI.MessageContentRefusalObject? value) + { + MessageRefusalObject = value; + } + + /// + /// + /// + public ContentItem2( + global::OpenAI.MessageObjectContentItemDiscriminatorType? type, + global::OpenAI.MessageContentImageFileObject? messageImageFileObject, + global::OpenAI.MessageContentImageUrlObject? messageImageUrlObject, + global::OpenAI.MessageContentTextObject? messageTextObject, + global::OpenAI.MessageContentRefusalObject? messageRefusalObject + ) + { + Type = type; + + MessageImageFileObject = messageImageFileObject; + MessageImageUrlObject = messageImageUrlObject; + MessageTextObject = messageTextObject; + MessageRefusalObject = messageRefusalObject; + } + + /// + /// + /// + public object? Object => + MessageRefusalObject as object ?? + MessageTextObject as object ?? + MessageImageUrlObject as object ?? + MessageImageFileObject as object + ; + + /// + /// + /// + public bool Validate() + { + return IsMessageImageFileObject && !IsMessageImageUrlObject && !IsMessageTextObject && !IsMessageRefusalObject || !IsMessageImageFileObject && IsMessageImageUrlObject && !IsMessageTextObject && !IsMessageRefusalObject || !IsMessageImageFileObject && !IsMessageImageUrlObject && IsMessageTextObject && !IsMessageRefusalObject || !IsMessageImageFileObject && !IsMessageImageUrlObject && !IsMessageTextObject && IsMessageRefusalObject; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? messageImageFileObject = null, + global::System.Func? messageImageUrlObject = null, + global::System.Func? messageTextObject = null, + global::System.Func? messageRefusalObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageImageFileObject && messageImageFileObject != null) + { + return messageImageFileObject(MessageImageFileObject!); + } + else if (IsMessageImageUrlObject && messageImageUrlObject != null) + { + return messageImageUrlObject(MessageImageUrlObject!); + } + else if (IsMessageTextObject && messageTextObject != null) + { + return messageTextObject(MessageTextObject!); + } + else if (IsMessageRefusalObject && messageRefusalObject != null) + { + return messageRefusalObject(MessageRefusalObject!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? messageImageFileObject = null, + global::System.Action? messageImageUrlObject = null, + global::System.Action? messageTextObject = null, + global::System.Action? messageRefusalObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageImageFileObject) + { + messageImageFileObject?.Invoke(MessageImageFileObject!); + } + else if (IsMessageImageUrlObject) + { + messageImageUrlObject?.Invoke(MessageImageUrlObject!); + } + else if (IsMessageTextObject) + { + messageTextObject?.Invoke(MessageTextObject!); + } + else if (IsMessageRefusalObject) + { + messageRefusalObject?.Invoke(MessageRefusalObject!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + MessageImageFileObject, + typeof(global::OpenAI.MessageContentImageFileObject), + MessageImageUrlObject, + typeof(global::OpenAI.MessageContentImageUrlObject), + MessageTextObject, + typeof(global::OpenAI.MessageContentTextObject), + MessageRefusalObject, + typeof(global::OpenAI.MessageContentRefusalObject), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ContentItem2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageFileObject, other.MessageImageFileObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageUrlObject, other.MessageImageUrlObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageTextObject, other.MessageTextObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageRefusalObject, other.MessageRefusalObject) + ; + } + + /// + /// + /// + public static bool operator ==(ContentItem2 obj1, ContentItem2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ContentItem2 obj1, ContentItem2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ContentItem2 o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ContentItem2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ContentItem2), + jsonSerializerContext) as global::OpenAI.ContentItem2?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ContentItem2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ContentVariant2Item.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ContentVariant2Item.g.cs new file mode 100644 index 00000000..a5d8b089 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ContentVariant2Item.g.cs @@ -0,0 +1,331 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ContentVariant2Item : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType? Type { get; } + + /// + /// References an image [File](/docs/api-reference/files) in the content of a message. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageContentImageFileObject? MessageImageFileObject { get; init; } +#else + public global::OpenAI.MessageContentImageFileObject? MessageImageFileObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageFileObject))] +#endif + public bool IsMessageImageFileObject => MessageImageFileObject != null; + + /// + /// + /// + public static implicit operator ContentVariant2Item(global::OpenAI.MessageContentImageFileObject value) => new ContentVariant2Item(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageContentImageFileObject?(ContentVariant2Item @this) => @this.MessageImageFileObject; + + /// + /// + /// + public ContentVariant2Item(global::OpenAI.MessageContentImageFileObject? value) + { + MessageImageFileObject = value; + } + + /// + /// References an image URL in the content of a message. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageContentImageUrlObject? MessageImageUrlObject { get; init; } +#else + public global::OpenAI.MessageContentImageUrlObject? MessageImageUrlObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageUrlObject))] +#endif + public bool IsMessageImageUrlObject => MessageImageUrlObject != null; + + /// + /// + /// + public static implicit operator ContentVariant2Item(global::OpenAI.MessageContentImageUrlObject value) => new ContentVariant2Item(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageContentImageUrlObject?(ContentVariant2Item @this) => @this.MessageImageUrlObject; + + /// + /// + /// + public ContentVariant2Item(global::OpenAI.MessageContentImageUrlObject? value) + { + MessageImageUrlObject = value; + } + + /// + /// The text content that is part of a message. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.MessageRequestContentTextObject? MessageRequestTextObject { get; init; } +#else + public global::OpenAI.MessageRequestContentTextObject? MessageRequestTextObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageRequestTextObject))] +#endif + public bool IsMessageRequestTextObject => MessageRequestTextObject != null; + + /// + /// + /// + public static implicit operator ContentVariant2Item(global::OpenAI.MessageRequestContentTextObject value) => new ContentVariant2Item(value); + + /// + /// + /// + public static implicit operator global::OpenAI.MessageRequestContentTextObject?(ContentVariant2Item @this) => @this.MessageRequestTextObject; + + /// + /// + /// + public ContentVariant2Item(global::OpenAI.MessageRequestContentTextObject? value) + { + MessageRequestTextObject = value; + } + + /// + /// + /// + public ContentVariant2Item( + global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType? type, + global::OpenAI.MessageContentImageFileObject? messageImageFileObject, + global::OpenAI.MessageContentImageUrlObject? messageImageUrlObject, + global::OpenAI.MessageRequestContentTextObject? messageRequestTextObject + ) + { + Type = type; + + MessageImageFileObject = messageImageFileObject; + MessageImageUrlObject = messageImageUrlObject; + MessageRequestTextObject = messageRequestTextObject; + } + + /// + /// + /// + public object? Object => + MessageRequestTextObject as object ?? + MessageImageUrlObject as object ?? + MessageImageFileObject as object + ; + + /// + /// + /// + public bool Validate() + { + return IsMessageImageFileObject && !IsMessageImageUrlObject && !IsMessageRequestTextObject || !IsMessageImageFileObject && IsMessageImageUrlObject && !IsMessageRequestTextObject || !IsMessageImageFileObject && !IsMessageImageUrlObject && IsMessageRequestTextObject; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? messageImageFileObject = null, + global::System.Func? messageImageUrlObject = null, + global::System.Func? messageRequestTextObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageImageFileObject && messageImageFileObject != null) + { + return messageImageFileObject(MessageImageFileObject!); + } + else if (IsMessageImageUrlObject && messageImageUrlObject != null) + { + return messageImageUrlObject(MessageImageUrlObject!); + } + else if (IsMessageRequestTextObject && messageRequestTextObject != null) + { + return messageRequestTextObject(MessageRequestTextObject!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? messageImageFileObject = null, + global::System.Action? messageImageUrlObject = null, + global::System.Action? messageRequestTextObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageImageFileObject) + { + messageImageFileObject?.Invoke(MessageImageFileObject!); + } + else if (IsMessageImageUrlObject) + { + messageImageUrlObject?.Invoke(MessageImageUrlObject!); + } + else if (IsMessageRequestTextObject) + { + messageRequestTextObject?.Invoke(MessageRequestTextObject!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + MessageImageFileObject, + typeof(global::OpenAI.MessageContentImageFileObject), + MessageImageUrlObject, + typeof(global::OpenAI.MessageContentImageUrlObject), + MessageRequestTextObject, + typeof(global::OpenAI.MessageRequestContentTextObject), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ContentVariant2Item other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageFileObject, other.MessageImageFileObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageUrlObject, other.MessageImageUrlObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageRequestTextObject, other.MessageRequestTextObject) + ; + } + + /// + /// + /// + public static bool operator ==(ContentVariant2Item obj1, ContentVariant2Item obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ContentVariant2Item obj1, ContentVariant2Item obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ContentVariant2Item o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ContentVariant2Item? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ContentVariant2Item), + jsonSerializerContext) as global::OpenAI.ContentVariant2Item?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ContentVariant2Item? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequest.g.cs index 73efe8c4..896d2ac1 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequest.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequest.g.cs @@ -41,7 +41,7 @@ public sealed partial class CreateAssistantRequest /// A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`. /// [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList>? Tools { get; set; } + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolDiscriminator.g.cs new file mode 100644 index 00000000..7491454a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class CreateAssistantRequestToolDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolDiscriminatorTypeJsonConverter))] + public global::OpenAI.CreateAssistantRequestToolDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateAssistantRequestToolDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateAssistantRequestToolDiscriminator), + jsonSerializerContext) as global::OpenAI.CreateAssistantRequestToolDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateAssistantRequestToolDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolDiscriminatorType.g.cs new file mode 100644 index 00000000..9e03c83a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum CreateAssistantRequestToolDiscriminatorType + { + /// + /// + /// + CodeInterpreter, + /// + /// + /// + FileSearch, + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateAssistantRequestToolDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateAssistantRequestToolDiscriminatorType value) + { + return value switch + { + CreateAssistantRequestToolDiscriminatorType.CodeInterpreter => "code_interpreter", + CreateAssistantRequestToolDiscriminatorType.FileSearch => "file_search", + CreateAssistantRequestToolDiscriminatorType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateAssistantRequestToolDiscriminatorType? ToEnum(string value) + { + return value switch + { + "code_interpreter" => CreateAssistantRequestToolDiscriminatorType.CodeInterpreter, + "file_search" => CreateAssistantRequestToolDiscriminatorType.FileSearch, + "function" => CreateAssistantRequestToolDiscriminatorType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStore.g.cs index 73669eab..0997575a 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStore.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -20,8 +18,8 @@ public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorS /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))] - public global::OpenAI.OneOf? ChunkingStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter))] + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy? ChunkingStrategy { get; set; } /// /// Set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs new file mode 100644 index 00000000..d92e599a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. + /// + public readonly partial struct CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Type { get; } + + /// + /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; init; } +#else + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1 value) => new CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(value); + + /// + /// + /// + public static implicit operator global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value1; + + /// + /// + /// + public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; init; } +#else + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2 value) => new CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(value); + + /// + /// + /// + public static implicit operator global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value2; + + /// + /// + /// + public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy( + global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? type, + global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1, + global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 + ) + { + Type = type; + + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? value1 = null, + global::System.Func? value2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsValue1 && value1 != null) + { + return value1(Value1!); + } + else if (IsValue2 && value2 != null) + { + return value2(Value2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? value1 = null, + global::System.Action? value2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsValue1) + { + value1?.Invoke(Value1!); + } + else if (IsValue2) + { + value2?.Invoke(Value2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), + Value2, + typeof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy obj1, CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy obj1, CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy), + jsonSerializerContext) as global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs new file mode 100644 index 00000000..193be5d5 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeJsonConverter))] + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator), + jsonSerializerContext) as global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs new file mode 100644 index 00000000..325bf0ba --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType + { + /// + /// + /// + Auto, + /// + /// + /// + Static, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType value) + { + return value switch + { + CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Auto => "auto", + CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Static => "static", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? ToEnum(string value) + { + return value switch + { + "auto" => CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Auto, + "static" => CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Static, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequest.g.cs index 3c2867cb..ab0407a0 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequest.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequest.g.cs @@ -128,8 +128,8 @@ public sealed partial class CreateChatCompletionRequest /// **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length. /// [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory3))] - public global::OpenAI.OneOf? ResponseFormat { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.ResponseFormatJsonConverter))] + public global::OpenAI.ResponseFormat? ResponseFormat { get; set; } /// /// This feature is in Beta.
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestResponseFormatDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestResponseFormatDiscriminator.g.cs new file mode 100644 index 00000000..e2e5c634 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestResponseFormatDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class CreateChatCompletionRequestResponseFormatDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateChatCompletionRequestResponseFormatDiscriminatorTypeJsonConverter))] + public global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminator), + jsonSerializerContext) as global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestResponseFormatDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestResponseFormatDiscriminatorType.g.cs new file mode 100644 index 00000000..f9e59849 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestResponseFormatDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum CreateChatCompletionRequestResponseFormatDiscriminatorType + { + /// + /// + /// + Text, + /// + /// + /// + JsonObject, + /// + /// + /// + JsonSchema, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateChatCompletionRequestResponseFormatDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateChatCompletionRequestResponseFormatDiscriminatorType value) + { + return value switch + { + CreateChatCompletionRequestResponseFormatDiscriminatorType.Text => "text", + CreateChatCompletionRequestResponseFormatDiscriminatorType.JsonObject => "json_object", + CreateChatCompletionRequestResponseFormatDiscriminatorType.JsonSchema => "json_schema", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateChatCompletionRequestResponseFormatDiscriminatorType? ToEnum(string value) + { + return value switch + { + "text" => CreateChatCompletionRequestResponseFormatDiscriminatorType.Text, + "json_object" => CreateChatCompletionRequestResponseFormatDiscriminatorType.JsonObject, + "json_schema" => CreateChatCompletionRequestResponseFormatDiscriminatorType.JsonSchema, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequest.g.cs index acc08da5..498ced93 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequest.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequest.g.cs @@ -26,7 +26,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.JsonRequired] - public required global::OpenAI.OneOf>> Content { get; set; } + public required global::OpenAI.OneOf> Content { get; set; } /// /// A list of files attached to the message, and the tools they should be added to. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestAttachment.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestAttachment.g.cs index c08e24b1..64540029 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestAttachment.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestAttachment.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -20,7 +18,7 @@ public sealed partial class CreateMessageRequestAttachment /// The tools to add this file to. /// [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList>? Tools { get; set; } + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminator.g.cs new file mode 100644 index 00000000..6da94758 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class CreateMessageRequestAttachmentToolDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateMessageRequestAttachmentToolDiscriminatorTypeJsonConverter))] + public global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateMessageRequestAttachmentToolDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateMessageRequestAttachmentToolDiscriminator), + jsonSerializerContext) as global::OpenAI.CreateMessageRequestAttachmentToolDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateMessageRequestAttachmentToolDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminatorType.g.cs new file mode 100644 index 00000000..d4fba746 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum CreateMessageRequestAttachmentToolDiscriminatorType + { + /// + /// + /// + CodeInterpreter, + /// + /// + /// + FileSearch, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateMessageRequestAttachmentToolDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateMessageRequestAttachmentToolDiscriminatorType value) + { + return value switch + { + CreateMessageRequestAttachmentToolDiscriminatorType.CodeInterpreter => "code_interpreter", + CreateMessageRequestAttachmentToolDiscriminatorType.FileSearch => "file_search", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateMessageRequestAttachmentToolDiscriminatorType? ToEnum(string value) + { + return value switch + { + "code_interpreter" => CreateMessageRequestAttachmentToolDiscriminatorType.CodeInterpreter, + "file_search" => CreateMessageRequestAttachmentToolDiscriminatorType.FileSearch, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminator.g.cs new file mode 100644 index 00000000..3808cfd9 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class CreateMessageRequestContentVariant2ItemDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateMessageRequestContentVariant2ItemDiscriminatorTypeJsonConverter))] + public global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator), + jsonSerializerContext) as global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminatorType.g.cs new file mode 100644 index 00000000..e9f3e0e1 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum CreateMessageRequestContentVariant2ItemDiscriminatorType + { + /// + /// + /// + ImageFile, + /// + /// + /// + ImageUrl, + /// + /// + /// + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateMessageRequestContentVariant2ItemDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateMessageRequestContentVariant2ItemDiscriminatorType value) + { + return value switch + { + CreateMessageRequestContentVariant2ItemDiscriminatorType.ImageFile => "image_file", + CreateMessageRequestContentVariant2ItemDiscriminatorType.ImageUrl => "image_url", + CreateMessageRequestContentVariant2ItemDiscriminatorType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateMessageRequestContentVariant2ItemDiscriminatorType? ToEnum(string value) + { + return value switch + { + "image_file" => CreateMessageRequestContentVariant2ItemDiscriminatorType.ImageFile, + "image_url" => CreateMessageRequestContentVariant2ItemDiscriminatorType.ImageUrl, + "text" => CreateMessageRequestContentVariant2ItemDiscriminatorType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequest.g.cs index a980a743..4dbdb542 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequest.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequest.g.cs @@ -17,7 +17,7 @@ public sealed partial class CreateModerationRequest [global::System.Text.Json.Serialization.JsonPropertyName("input")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory3))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::OpenAI.OneOf, global::System.Collections.Generic.IList>> Input { get; set; } + public required global::OpenAI.OneOf, global::System.Collections.Generic.IList> Input { get; set; } /// /// The content moderation model you would like to use. Learn more in
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminator.g.cs new file mode 100644 index 00000000..f4371721 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class CreateModerationRequestInputVariant3ItemDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemDiscriminatorTypeJsonConverter))] + public global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator), + jsonSerializerContext) as global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminatorType.g.cs new file mode 100644 index 00000000..0aca0d02 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum CreateModerationRequestInputVariant3ItemDiscriminatorType + { + /// + /// + /// + ImageUrl, + /// + /// + /// + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateModerationRequestInputVariant3ItemDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateModerationRequestInputVariant3ItemDiscriminatorType value) + { + return value switch + { + CreateModerationRequestInputVariant3ItemDiscriminatorType.ImageUrl => "image_url", + CreateModerationRequestInputVariant3ItemDiscriminatorType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateModerationRequestInputVariant3ItemDiscriminatorType? ToEnum(string value) + { + return value switch + { + "image_url" => CreateModerationRequestInputVariant3ItemDiscriminatorType.ImageUrl, + "text" => CreateModerationRequestInputVariant3ItemDiscriminatorType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequest.g.cs index d835598d..db14812c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequest.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequest.g.cs @@ -47,7 +47,7 @@ public sealed partial class CreateRunRequest /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. ///
[global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList>? Tools { get; set; } + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequestToolDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequestToolDiscriminator.g.cs new file mode 100644 index 00000000..09eb3c7a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequestToolDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class CreateRunRequestToolDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateRunRequestToolDiscriminatorTypeJsonConverter))] + public global::OpenAI.CreateRunRequestToolDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateRunRequestToolDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateRunRequestToolDiscriminator), + jsonSerializerContext) as global::OpenAI.CreateRunRequestToolDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateRunRequestToolDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequestToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequestToolDiscriminatorType.g.cs new file mode 100644 index 00000000..fccbbf5f --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequestToolDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum CreateRunRequestToolDiscriminatorType + { + /// + /// + /// + CodeInterpreter, + /// + /// + /// + FileSearch, + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateRunRequestToolDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateRunRequestToolDiscriminatorType value) + { + return value switch + { + CreateRunRequestToolDiscriminatorType.CodeInterpreter => "code_interpreter", + CreateRunRequestToolDiscriminatorType.FileSearch => "file_search", + CreateRunRequestToolDiscriminatorType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateRunRequestToolDiscriminatorType? ToEnum(string value) + { + return value switch + { + "code_interpreter" => CreateRunRequestToolDiscriminatorType.CodeInterpreter, + "file_search" => CreateRunRequestToolDiscriminatorType.FileSearch, + "function" => CreateRunRequestToolDiscriminatorType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequest.g.cs index 175d205c..b7a51340 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequest.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequest.g.cs @@ -41,7 +41,7 @@ public sealed partial class CreateThreadAndRunRequest /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. /// [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList>? Tools { get; set; } + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequestToolDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequestToolDiscriminator.g.cs new file mode 100644 index 00000000..8e1609e0 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequestToolDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class CreateThreadAndRunRequestToolDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateThreadAndRunRequestToolDiscriminatorTypeJsonConverter))] + public global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateThreadAndRunRequestToolDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateThreadAndRunRequestToolDiscriminator), + jsonSerializerContext) as global::OpenAI.CreateThreadAndRunRequestToolDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateThreadAndRunRequestToolDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequestToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequestToolDiscriminatorType.g.cs new file mode 100644 index 00000000..661acd3a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequestToolDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum CreateThreadAndRunRequestToolDiscriminatorType + { + /// + /// + /// + CodeInterpreter, + /// + /// + /// + FileSearch, + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateThreadAndRunRequestToolDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateThreadAndRunRequestToolDiscriminatorType value) + { + return value switch + { + CreateThreadAndRunRequestToolDiscriminatorType.CodeInterpreter => "code_interpreter", + CreateThreadAndRunRequestToolDiscriminatorType.FileSearch => "file_search", + CreateThreadAndRunRequestToolDiscriminatorType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateThreadAndRunRequestToolDiscriminatorType? ToEnum(string value) + { + return value switch + { + "code_interpreter" => CreateThreadAndRunRequestToolDiscriminatorType.CodeInterpreter, + "file_search" => CreateThreadAndRunRequestToolDiscriminatorType.FileSearch, + "function" => CreateThreadAndRunRequestToolDiscriminatorType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStore.g.cs index c7bcff20..ba4305af 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStore.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -20,8 +18,8 @@ public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStor /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))] - public global::OpenAI.OneOf? ChunkingStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter))] + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy? ChunkingStrategy { get; set; } /// /// Set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs new file mode 100644 index 00000000..b96dfbae --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. + /// + public readonly partial struct CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Type { get; } + + /// + /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; init; } +#else + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1 value) => new CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(value); + + /// + /// + /// + public static implicit operator global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value1; + + /// + /// + /// + public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; init; } +#else + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2 value) => new CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(value); + + /// + /// + /// + public static implicit operator global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value2; + + /// + /// + /// + public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy( + global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? type, + global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1, + global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 + ) + { + Type = type; + + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? value1 = null, + global::System.Func? value2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsValue1 && value1 != null) + { + return value1(Value1!); + } + else if (IsValue2 && value2 != null) + { + return value2(Value2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? value1 = null, + global::System.Action? value2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsValue1) + { + value1?.Invoke(Value1!); + } + else if (IsValue2) + { + value2?.Invoke(Value2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), + Value2, + typeof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy obj1, CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy obj1, CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy), + jsonSerializerContext) as global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs new file mode 100644 index 00000000..9d8f427d --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeJsonConverter))] + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator), + jsonSerializerContext) as global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs new file mode 100644 index 00000000..a71a1e10 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType + { + /// + /// + /// + Auto, + /// + /// + /// + Static, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType value) + { + return value switch + { + CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Auto => "auto", + CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Static => "static", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? ToEnum(string value) + { + return value switch + { + "auto" => CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Auto, + "static" => CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Static, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequest.g.cs index 79e12011..75e1d18c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequest.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequest.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -32,8 +30,8 @@ public sealed partial class CreateVectorStoreRequest /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty. /// [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))] - public global::OpenAI.OneOf? ChunkingStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateVectorStoreRequestChunkingStrategyJsonConverter))] + public global::OpenAI.CreateVectorStoreRequestChunkingStrategy? ChunkingStrategy { get; set; } /// /// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequestChunkingStrategy.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequestChunkingStrategy.g.cs new file mode 100644 index 00000000..60dd7716 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequestChunkingStrategy.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty. + /// + public readonly partial struct CreateVectorStoreRequestChunkingStrategy : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType? Type { get; } + + /// + /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AutoChunkingStrategyRequestParam? AutoParam { get; init; } +#else + public global::OpenAI.AutoChunkingStrategyRequestParam? AutoParam { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AutoParam))] +#endif + public bool IsAutoParam => AutoParam != null; + + /// + /// + /// + public static implicit operator CreateVectorStoreRequestChunkingStrategy(global::OpenAI.AutoChunkingStrategyRequestParam value) => new CreateVectorStoreRequestChunkingStrategy(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AutoChunkingStrategyRequestParam?(CreateVectorStoreRequestChunkingStrategy @this) => @this.AutoParam; + + /// + /// + /// + public CreateVectorStoreRequestChunkingStrategy(global::OpenAI.AutoChunkingStrategyRequestParam? value) + { + AutoParam = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.StaticChunkingStrategyRequestParam? StaticParam { get; init; } +#else + public global::OpenAI.StaticChunkingStrategyRequestParam? StaticParam { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StaticParam))] +#endif + public bool IsStaticParam => StaticParam != null; + + /// + /// + /// + public static implicit operator CreateVectorStoreRequestChunkingStrategy(global::OpenAI.StaticChunkingStrategyRequestParam value) => new CreateVectorStoreRequestChunkingStrategy(value); + + /// + /// + /// + public static implicit operator global::OpenAI.StaticChunkingStrategyRequestParam?(CreateVectorStoreRequestChunkingStrategy @this) => @this.StaticParam; + + /// + /// + /// + public CreateVectorStoreRequestChunkingStrategy(global::OpenAI.StaticChunkingStrategyRequestParam? value) + { + StaticParam = value; + } + + /// + /// + /// + public CreateVectorStoreRequestChunkingStrategy( + global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType? type, + global::OpenAI.AutoChunkingStrategyRequestParam? autoParam, + global::OpenAI.StaticChunkingStrategyRequestParam? staticParam + ) + { + Type = type; + + AutoParam = autoParam; + StaticParam = staticParam; + } + + /// + /// + /// + public object? Object => + StaticParam as object ?? + AutoParam as object + ; + + /// + /// + /// + public bool Validate() + { + return IsAutoParam && !IsStaticParam || !IsAutoParam && IsStaticParam; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? autoParam = null, + global::System.Func? staticParam = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAutoParam && autoParam != null) + { + return autoParam(AutoParam!); + } + else if (IsStaticParam && staticParam != null) + { + return staticParam(StaticParam!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? autoParam = null, + global::System.Action? staticParam = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAutoParam) + { + autoParam?.Invoke(AutoParam!); + } + else if (IsStaticParam) + { + staticParam?.Invoke(StaticParam!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AutoParam, + typeof(global::OpenAI.AutoChunkingStrategyRequestParam), + StaticParam, + typeof(global::OpenAI.StaticChunkingStrategyRequestParam), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(CreateVectorStoreRequestChunkingStrategy other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AutoParam, other.AutoParam) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(StaticParam, other.StaticParam) + ; + } + + /// + /// + /// + public static bool operator ==(CreateVectorStoreRequestChunkingStrategy obj1, CreateVectorStoreRequestChunkingStrategy obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(CreateVectorStoreRequestChunkingStrategy obj1, CreateVectorStoreRequestChunkingStrategy obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is CreateVectorStoreRequestChunkingStrategy o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateVectorStoreRequestChunkingStrategy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateVectorStoreRequestChunkingStrategy), + jsonSerializerContext) as global::OpenAI.CreateVectorStoreRequestChunkingStrategy?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateVectorStoreRequestChunkingStrategy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequestChunkingStrategyDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequestChunkingStrategyDiscriminator.g.cs new file mode 100644 index 00000000..3c11b141 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequestChunkingStrategyDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class CreateVectorStoreRequestChunkingStrategyDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeJsonConverter))] + public global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminator), + jsonSerializerContext) as global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequestChunkingStrategyDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequestChunkingStrategyDiscriminatorType.g.cs new file mode 100644 index 00000000..8e541508 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateVectorStoreRequestChunkingStrategyDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum CreateVectorStoreRequestChunkingStrategyDiscriminatorType + { + /// + /// + /// + Auto, + /// + /// + /// + Static, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateVectorStoreRequestChunkingStrategyDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateVectorStoreRequestChunkingStrategyDiscriminatorType value) + { + return value switch + { + CreateVectorStoreRequestChunkingStrategyDiscriminatorType.Auto => "auto", + CreateVectorStoreRequestChunkingStrategyDiscriminatorType.Static => "static", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateVectorStoreRequestChunkingStrategyDiscriminatorType? ToEnum(string value) + { + return value switch + { + "auto" => CreateVectorStoreRequestChunkingStrategyDiscriminatorType.Auto, + "static" => CreateVectorStoreRequestChunkingStrategyDiscriminatorType.Static, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ThreadStreamEvent.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.InputVariant3Item.g.cs similarity index 55% rename from src/libs/OpenAI/Generated/OpenAI.Models.ThreadStreamEvent.g.cs rename to src/libs/OpenAI/Generated/OpenAI.Models.InputVariant3Item.g.cs index 35c1e819..68593ba2 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.ThreadStreamEvent.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.InputVariant3Item.g.cs @@ -8,15 +8,20 @@ namespace OpenAI /// /// /// - public readonly partial struct ThreadStreamEvent : global::System.IEquatable + public readonly partial struct InputVariant3Item : global::System.IEquatable { /// - /// Occurs when a new [thread](/docs/api-reference/threads/object) is created. + /// + /// + public global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType? Type { get; } + + /// + /// An object describing an image to classify. /// #if NET6_0_OR_GREATER - public global::OpenAI.ThreadStreamEventVariant1? Value1 { get; init; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1? Value1 { get; init; } #else - public global::OpenAI.ThreadStreamEventVariant1? Value1 { get; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1? Value1 { get; } #endif /// @@ -30,25 +35,76 @@ namespace OpenAI /// /// /// - public static implicit operator ThreadStreamEvent(global::OpenAI.ThreadStreamEventVariant1 value) => new ThreadStreamEvent(value); + public static implicit operator InputVariant3Item(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1 value) => new InputVariant3Item(value); /// /// /// - public static implicit operator global::OpenAI.ThreadStreamEventVariant1?(ThreadStreamEvent @this) => @this.Value1; + public static implicit operator global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1?(InputVariant3Item @this) => @this.Value1; /// /// /// - public ThreadStreamEvent(global::OpenAI.ThreadStreamEventVariant1? value) + public InputVariant3Item(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1? value) { Value1 = value; } + /// + /// An object describing text to classify. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2? Value2 { get; init; } +#else + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator InputVariant3Item(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2 value) => new InputVariant3Item(value); + + /// + /// + /// + public static implicit operator global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2?(InputVariant3Item @this) => @this.Value2; + + /// + /// + /// + public InputVariant3Item(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public InputVariant3Item( + global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType? type, + global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1? value1, + global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2? value2 + ) + { + Type = type; + + Value1 = value1; + Value2 = value2; + } + /// /// /// public object? Object => + Value2 as object ?? Value1 as object ; @@ -57,14 +113,15 @@ Value1 as object /// public bool Validate() { - return IsValue1; + return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, + global::System.Func? value1 = null, + global::System.Func? value2 = null, bool validate = true) { if (validate) @@ -76,6 +133,10 @@ public bool Validate() { return value1(Value1!); } + else if (IsValue2 && value2 != null) + { + return value2(Value2!); + } return default(TResult); } @@ -84,7 +145,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, + global::System.Action? value1 = null, + global::System.Action? value2 = null, bool validate = true) { if (validate) @@ -96,6 +158,10 @@ public void Match( { value1?.Invoke(Value1!); } + else if (IsValue2) + { + value2?.Invoke(Value2!); + } } /// @@ -106,7 +172,9 @@ public override int GetHashCode() var fields = new object?[] { Value1, - typeof(global::OpenAI.ThreadStreamEventVariant1), + typeof(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1), + Value2, + typeof(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -119,25 +187,26 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null /// /// /// - public bool Equals(ThreadStreamEvent other) + public bool Equals(InputVariant3Item other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) ; } /// /// /// - public static bool operator ==(ThreadStreamEvent obj1, ThreadStreamEvent obj2) + public static bool operator ==(InputVariant3Item obj1, InputVariant3Item obj2) { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); } /// /// /// - public static bool operator !=(ThreadStreamEvent obj1, ThreadStreamEvent obj2) + public static bool operator !=(InputVariant3Item obj1, InputVariant3Item obj2) { return !(obj1 == obj2); } @@ -147,7 +216,7 @@ public bool Equals(ThreadStreamEvent other) /// public override bool Equals(object? obj) { - return obj is ThreadStreamEvent o && Equals(o); + return obj is InputVariant3Item o && Equals(o); } @@ -181,14 +250,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenAI.ThreadStreamEvent? FromJson( + public static global::OpenAI.InputVariant3Item? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenAI.ThreadStreamEvent), - jsonSerializerContext) as global::OpenAI.ThreadStreamEvent?; + typeof(global::OpenAI.InputVariant3Item), + jsonSerializerContext) as global::OpenAI.InputVariant3Item?; } /// @@ -198,11 +267,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenAI.ThreadStreamEvent? FromJson( + public static global::OpenAI.InputVariant3Item? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageContentTextObjectText.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageContentTextObjectText.g.cs index 942b32b0..b33baf58 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageContentTextObjectText.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageContentTextObjectText.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -22,7 +20,7 @@ public sealed partial class MessageContentTextObjectText /// [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> Annotations { get; set; } + public required global::System.Collections.Generic.IList Annotations { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageContentTextObjectTextAnnotationDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageContentTextObjectTextAnnotationDiscriminator.g.cs new file mode 100644 index 00000000..13b313bf --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageContentTextObjectTextAnnotationDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class MessageContentTextObjectTextAnnotationDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.MessageContentTextObjectTextAnnotationDiscriminatorTypeJsonConverter))] + public global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminator), + jsonSerializerContext) as global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageContentTextObjectTextAnnotationDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageContentTextObjectTextAnnotationDiscriminatorType.g.cs new file mode 100644 index 00000000..83707447 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageContentTextObjectTextAnnotationDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum MessageContentTextObjectTextAnnotationDiscriminatorType + { + /// + /// + /// + FileCitation, + /// + /// + /// + FilePath, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MessageContentTextObjectTextAnnotationDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MessageContentTextObjectTextAnnotationDiscriminatorType value) + { + return value switch + { + MessageContentTextObjectTextAnnotationDiscriminatorType.FileCitation => "file_citation", + MessageContentTextObjectTextAnnotationDiscriminatorType.FilePath => "file_path", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MessageContentTextObjectTextAnnotationDiscriminatorType? ToEnum(string value) + { + return value switch + { + "file_citation" => MessageContentTextObjectTextAnnotationDiscriminatorType.FileCitation, + "file_path" => MessageContentTextObjectTextAnnotationDiscriminatorType.FilePath, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaContentTextObjectText.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaContentTextObjectText.g.cs index 0453d847..ff024899 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaContentTextObjectText.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaContentTextObjectText.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -20,7 +18,7 @@ public sealed partial class MessageDeltaContentTextObjectText /// /// [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] - public global::System.Collections.Generic.IList>? Annotations { get; set; } + public global::System.Collections.Generic.IList? Annotations { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaContentTextObjectTextAnnotationDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaContentTextObjectTextAnnotationDiscriminator.g.cs new file mode 100644 index 00000000..97a39336 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaContentTextObjectTextAnnotationDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class MessageDeltaContentTextObjectTextAnnotationDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeJsonConverter))] + public global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminator), + jsonSerializerContext) as global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.g.cs new file mode 100644 index 00000000..8f2ce632 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum MessageDeltaContentTextObjectTextAnnotationDiscriminatorType + { + /// + /// + /// + FileCitation, + /// + /// + /// + FilePath, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MessageDeltaContentTextObjectTextAnnotationDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MessageDeltaContentTextObjectTextAnnotationDiscriminatorType value) + { + return value switch + { + MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.FileCitation => "file_citation", + MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.FilePath => "file_path", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MessageDeltaContentTextObjectTextAnnotationDiscriminatorType? ToEnum(string value) + { + return value switch + { + "file_citation" => MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.FileCitation, + "file_path" => MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.FilePath, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaObjectDelta.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaObjectDelta.g.cs index 632a2a68..cdb66f67 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaObjectDelta.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaObjectDelta.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -21,7 +19,7 @@ public sealed partial class MessageDeltaObjectDelta /// The content of the message in array of text and/or images. /// [global::System.Text.Json.Serialization.JsonPropertyName("content")] - public global::System.Collections.Generic.IList>? Content { get; set; } + public global::System.Collections.Generic.IList? Content { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaObjectDeltaContentItemDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaObjectDeltaContentItemDiscriminator.g.cs new file mode 100644 index 00000000..b27dcd67 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaObjectDeltaContentItemDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class MessageDeltaObjectDeltaContentItemDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.MessageDeltaObjectDeltaContentItemDiscriminatorTypeJsonConverter))] + public global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminator), + jsonSerializerContext) as global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.MessageDeltaObjectDeltaContentItemDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaObjectDeltaContentItemDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaObjectDeltaContentItemDiscriminatorType.g.cs new file mode 100644 index 00000000..6d3e52da --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageDeltaObjectDeltaContentItemDiscriminatorType.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum MessageDeltaObjectDeltaContentItemDiscriminatorType + { + /// + /// + /// + ImageFile, + /// + /// + /// + Text, + /// + /// + /// + Refusal, + /// + /// + /// + ImageUrl, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MessageDeltaObjectDeltaContentItemDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MessageDeltaObjectDeltaContentItemDiscriminatorType value) + { + return value switch + { + MessageDeltaObjectDeltaContentItemDiscriminatorType.ImageFile => "image_file", + MessageDeltaObjectDeltaContentItemDiscriminatorType.Text => "text", + MessageDeltaObjectDeltaContentItemDiscriminatorType.Refusal => "refusal", + MessageDeltaObjectDeltaContentItemDiscriminatorType.ImageUrl => "image_url", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MessageDeltaObjectDeltaContentItemDiscriminatorType? ToEnum(string value) + { + return value switch + { + "image_file" => MessageDeltaObjectDeltaContentItemDiscriminatorType.ImageFile, + "text" => MessageDeltaObjectDeltaContentItemDiscriminatorType.Text, + "refusal" => MessageDeltaObjectDeltaContentItemDiscriminatorType.Refusal, + "image_url" => MessageDeltaObjectDeltaContentItemDiscriminatorType.ImageUrl, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObject.g.cs index 140ae2ac..7bc41591 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageObject.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObject.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -79,7 +77,7 @@ public sealed partial class MessageObject /// [global::System.Text.Json.Serialization.JsonPropertyName("content")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> Content { get; set; } + public required global::System.Collections.Generic.IList Content { get; set; } /// /// If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectAttachment.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectAttachment.g.cs index 343bcc83..863af0dd 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectAttachment.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectAttachment.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -20,7 +18,7 @@ public sealed partial class MessageObjectAttachment /// The tools to add this file to. /// [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList>? Tools { get; set; } + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectAttachmentToolDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectAttachmentToolDiscriminator.g.cs new file mode 100644 index 00000000..00abd03d --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectAttachmentToolDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class MessageObjectAttachmentToolDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.MessageObjectAttachmentToolDiscriminatorTypeJsonConverter))] + public global::OpenAI.MessageObjectAttachmentToolDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.MessageObjectAttachmentToolDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.MessageObjectAttachmentToolDiscriminator), + jsonSerializerContext) as global::OpenAI.MessageObjectAttachmentToolDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.MessageObjectAttachmentToolDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectAttachmentToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectAttachmentToolDiscriminatorType.g.cs new file mode 100644 index 00000000..6d4dc8d8 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectAttachmentToolDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum MessageObjectAttachmentToolDiscriminatorType + { + /// + /// + /// + CodeInterpreter, + /// + /// + /// + FileSearch, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MessageObjectAttachmentToolDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MessageObjectAttachmentToolDiscriminatorType value) + { + return value switch + { + MessageObjectAttachmentToolDiscriminatorType.CodeInterpreter => "code_interpreter", + MessageObjectAttachmentToolDiscriminatorType.FileSearch => "file_search", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MessageObjectAttachmentToolDiscriminatorType? ToEnum(string value) + { + return value switch + { + "code_interpreter" => MessageObjectAttachmentToolDiscriminatorType.CodeInterpreter, + "file_search" => MessageObjectAttachmentToolDiscriminatorType.FileSearch, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectContentItemDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectContentItemDiscriminator.g.cs new file mode 100644 index 00000000..79f7d305 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectContentItemDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class MessageObjectContentItemDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.MessageObjectContentItemDiscriminatorTypeJsonConverter))] + public global::OpenAI.MessageObjectContentItemDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.MessageObjectContentItemDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.MessageObjectContentItemDiscriminator), + jsonSerializerContext) as global::OpenAI.MessageObjectContentItemDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.MessageObjectContentItemDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectContentItemDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectContentItemDiscriminatorType.g.cs new file mode 100644 index 00000000..6590677d --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.MessageObjectContentItemDiscriminatorType.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum MessageObjectContentItemDiscriminatorType + { + /// + /// + /// + ImageFile, + /// + /// + /// + ImageUrl, + /// + /// + /// + Text, + /// + /// + /// + Refusal, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MessageObjectContentItemDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MessageObjectContentItemDiscriminatorType value) + { + return value switch + { + MessageObjectContentItemDiscriminatorType.ImageFile => "image_file", + MessageObjectContentItemDiscriminatorType.ImageUrl => "image_url", + MessageObjectContentItemDiscriminatorType.Text => "text", + MessageObjectContentItemDiscriminatorType.Refusal => "refusal", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MessageObjectContentItemDiscriminatorType? ToEnum(string value) + { + return value switch + { + "image_file" => MessageObjectContentItemDiscriminatorType.ImageFile, + "image_url" => MessageObjectContentItemDiscriminatorType.ImageUrl, + "text" => MessageObjectContentItemDiscriminatorType.Text, + "refusal" => MessageObjectContentItemDiscriminatorType.Refusal, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEvent.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEvent.g.cs deleted file mode 100644 index 47e74952..00000000 --- a/src/libs/OpenAI/Generated/OpenAI.Models.MessageStreamEvent.g.cs +++ /dev/null @@ -1,425 +0,0 @@ -using System.Linq; -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace OpenAI -{ - /// - /// - /// - public readonly partial struct MessageStreamEvent : global::System.IEquatable - { - /// - /// Occurs when a [message](/docs/api-reference/messages/object) is created. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.MessageStreamEventVariant1? Value1 { get; init; } -#else - public global::OpenAI.MessageStreamEventVariant1? Value1 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] -#endif - public bool IsValue1 => Value1 != null; - - /// - /// - /// - public static implicit operator MessageStreamEvent(global::OpenAI.MessageStreamEventVariant1 value) => new MessageStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.MessageStreamEventVariant1?(MessageStreamEvent @this) => @this.Value1; - - /// - /// - /// - public MessageStreamEvent(global::OpenAI.MessageStreamEventVariant1? value) - { - Value1 = value; - } - - /// - /// Occurs when a [message](/docs/api-reference/messages/object) moves to an `in_progress` state. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.MessageStreamEventVariant2? Value2 { get; init; } -#else - public global::OpenAI.MessageStreamEventVariant2? Value2 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; - - /// - /// - /// - public static implicit operator MessageStreamEvent(global::OpenAI.MessageStreamEventVariant2 value) => new MessageStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.MessageStreamEventVariant2?(MessageStreamEvent @this) => @this.Value2; - - /// - /// - /// - public MessageStreamEvent(global::OpenAI.MessageStreamEventVariant2? value) - { - Value2 = value; - } - - /// - /// Occurs when parts of a [Message](/docs/api-reference/messages/object) are being streamed. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.MessageStreamEventVariant3? Value3 { get; init; } -#else - public global::OpenAI.MessageStreamEventVariant3? Value3 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; - - /// - /// - /// - public static implicit operator MessageStreamEvent(global::OpenAI.MessageStreamEventVariant3 value) => new MessageStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.MessageStreamEventVariant3?(MessageStreamEvent @this) => @this.Value3; - - /// - /// - /// - public MessageStreamEvent(global::OpenAI.MessageStreamEventVariant3? value) - { - Value3 = value; - } - - /// - /// Occurs when a [message](/docs/api-reference/messages/object) is completed. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.MessageStreamEventVariant4? Value4 { get; init; } -#else - public global::OpenAI.MessageStreamEventVariant4? Value4 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] -#endif - public bool IsValue4 => Value4 != null; - - /// - /// - /// - public static implicit operator MessageStreamEvent(global::OpenAI.MessageStreamEventVariant4 value) => new MessageStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.MessageStreamEventVariant4?(MessageStreamEvent @this) => @this.Value4; - - /// - /// - /// - public MessageStreamEvent(global::OpenAI.MessageStreamEventVariant4? value) - { - Value4 = value; - } - - /// - /// Occurs when a [message](/docs/api-reference/messages/object) ends before it is completed. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.MessageStreamEventVariant5? Value5 { get; init; } -#else - public global::OpenAI.MessageStreamEventVariant5? Value5 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] -#endif - public bool IsValue5 => Value5 != null; - - /// - /// - /// - public static implicit operator MessageStreamEvent(global::OpenAI.MessageStreamEventVariant5 value) => new MessageStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.MessageStreamEventVariant5?(MessageStreamEvent @this) => @this.Value5; - - /// - /// - /// - public MessageStreamEvent(global::OpenAI.MessageStreamEventVariant5? value) - { - Value5 = value; - } - - /// - /// - /// - public MessageStreamEvent( - global::OpenAI.MessageStreamEventVariant1? value1, - global::OpenAI.MessageStreamEventVariant2? value2, - global::OpenAI.MessageStreamEventVariant3? value3, - global::OpenAI.MessageStreamEventVariant4? value4, - global::OpenAI.MessageStreamEventVariant5? value5 - ) - { - Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; - Value5 = value5; - } - - /// - /// - /// - public object? Object => - Value5 as object ?? - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public bool Validate() - { - return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 && !IsValue5 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4 && !IsValue5 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && IsValue5; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, - global::System.Func? value4 = null, - global::System.Func? value5 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1 && value1 != null) - { - return value1(Value1!); - } - else if (IsValue2 && value2 != null) - { - return value2(Value2!); - } - else if (IsValue3 && value3 != null) - { - return value3(Value3!); - } - else if (IsValue4 && value4 != null) - { - return value4(Value4!); - } - else if (IsValue5 && value5 != null) - { - return value5(Value5!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, - global::System.Action? value4 = null, - global::System.Action? value5 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1) - { - value1?.Invoke(Value1!); - } - else if (IsValue2) - { - value2?.Invoke(Value2!); - } - else if (IsValue3) - { - value3?.Invoke(Value3!); - } - else if (IsValue4) - { - value4?.Invoke(Value4!); - } - else if (IsValue5) - { - value5?.Invoke(Value5!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Value1, - typeof(global::OpenAI.MessageStreamEventVariant1), - Value2, - typeof(global::OpenAI.MessageStreamEventVariant2), - Value3, - typeof(global::OpenAI.MessageStreamEventVariant3), - Value4, - typeof(global::OpenAI.MessageStreamEventVariant4), - Value5, - typeof(global::OpenAI.MessageStreamEventVariant5), - }; - const int offset = unchecked((int)2166136261); - const int prime = 16777619; - static int HashCodeAggregator(int hashCode, object? value) => value == null - ? (hashCode ^ 0) * prime - : (hashCode ^ value.GetHashCode()) * prime; - return fields.Aggregate(offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(MessageStreamEvent other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value3, other.Value3) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5) - ; - } - - /// - /// - /// - public static bool operator ==(MessageStreamEvent obj1, MessageStreamEvent obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(MessageStreamEvent obj1, MessageStreamEvent obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is MessageStreamEvent o && Equals(o); - } - - - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. - /// - public string ToJson( - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - this.GetType(), - jsonSerializerContext); - } - - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public string ToJson( - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::OpenAI.MessageStreamEvent? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::OpenAI.MessageStreamEvent), - jsonSerializerContext) as global::OpenAI.MessageStreamEvent?; - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public static global::OpenAI.MessageStreamEvent? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - } -} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ModifyAssistantRequest.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ModifyAssistantRequest.g.cs index e52b3fdd..2583bb4b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.ModifyAssistantRequest.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ModifyAssistantRequest.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -38,7 +36,7 @@ public sealed partial class ModifyAssistantRequest /// A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`. /// [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList>? Tools { get; set; } + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ModifyAssistantRequestToolDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ModifyAssistantRequestToolDiscriminator.g.cs new file mode 100644 index 00000000..c606e80b --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ModifyAssistantRequestToolDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class ModifyAssistantRequestToolDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.ModifyAssistantRequestToolDiscriminatorTypeJsonConverter))] + public global::OpenAI.ModifyAssistantRequestToolDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ModifyAssistantRequestToolDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ModifyAssistantRequestToolDiscriminator), + jsonSerializerContext) as global::OpenAI.ModifyAssistantRequestToolDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ModifyAssistantRequestToolDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ModifyAssistantRequestToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ModifyAssistantRequestToolDiscriminatorType.g.cs new file mode 100644 index 00000000..5cdbf5fa --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ModifyAssistantRequestToolDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum ModifyAssistantRequestToolDiscriminatorType + { + /// + /// + /// + CodeInterpreter, + /// + /// + /// + FileSearch, + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ModifyAssistantRequestToolDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ModifyAssistantRequestToolDiscriminatorType value) + { + return value switch + { + ModifyAssistantRequestToolDiscriminatorType.CodeInterpreter => "code_interpreter", + ModifyAssistantRequestToolDiscriminatorType.FileSearch => "file_search", + ModifyAssistantRequestToolDiscriminatorType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ModifyAssistantRequestToolDiscriminatorType? ToEnum(string value) + { + return value switch + { + "code_interpreter" => ModifyAssistantRequestToolDiscriminatorType.CodeInterpreter, + "file_search" => ModifyAssistantRequestToolDiscriminatorType.FileSearch, + "function" => ModifyAssistantRequestToolDiscriminatorType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEvent.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEvent.g.cs index 7626d4f5..7b3ad46f 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEvent.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEvent.g.cs @@ -10,6 +10,11 @@ namespace OpenAI /// public readonly partial struct RealtimeServerEvent : global::System.IEquatable { + /// + /// + /// + public global::OpenAI.RealtimeServerEventDiscriminatorType? Type { get; } + /// /// Returned when an error occurs. /// @@ -994,6 +999,7 @@ public RealtimeServerEvent(global::OpenAI.RealtimeRateLimitsUpdated? value) /// ///
public RealtimeServerEvent( + global::OpenAI.RealtimeServerEventDiscriminatorType? type, global::OpenAI.RealtimeError? error, global::OpenAI.RealtimeSessionCreated? sessionCreated, global::OpenAI.RealtimeSessionUpdated? sessionUpdated, @@ -1024,6 +1030,8 @@ public RealtimeServerEvent( global::OpenAI.RealtimeRateLimitsUpdated? rateLimitsUpdated ) { + Type = type; + Error = error; SessionCreated = sessionCreated; SessionUpdated = sessionUpdated; diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventDiscriminator.g.cs new file mode 100644 index 00000000..57391750 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeServerEventDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventDiscriminatorTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RealtimeServerEventDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RealtimeServerEventDiscriminator), + jsonSerializerContext) as global::OpenAI.RealtimeServerEventDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RealtimeServerEventDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventDiscriminatorType.g.cs new file mode 100644 index 00000000..708bd190 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventDiscriminatorType.g.cs @@ -0,0 +1,207 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum RealtimeServerEventDiscriminatorType + { + /// + /// + /// + Error, + /// + /// + /// + SessionCreated, + /// + /// + /// + SessionUpdated, + /// + /// + /// + ConversationCreated, + /// + /// + /// + ConversationItemCreated, + /// + /// + /// + ConversationItemInputAudioTranscriptionCompleted, + /// + /// + /// + ConversationItemInputAudioTranscriptionFailed, + /// + /// + /// + ConversationItemTruncated, + /// + /// + /// + ConversationItemDeleted, + /// + /// + /// + InputAudioBufferCommitted, + /// + /// + /// + InputAudioBufferCleared, + /// + /// + /// + InputAudioBufferSpeechStarted, + /// + /// + /// + InputAudioBufferSpeechStopped, + /// + /// + /// + ResponseCreated, + /// + /// + /// + ResponseDone, + /// + /// + /// + ResponseOutputItemAdded, + /// + /// + /// + ResponseOutputItemDone, + /// + /// + /// + ResponseContentPartAdded, + /// + /// + /// + ResponseContentPartDone, + /// + /// + /// + ResponseTextDelta, + /// + /// + /// + ResponseTextDone, + /// + /// + /// + ResponseAudioTranscriptDelta, + /// + /// + /// + ResponseAudioTranscriptDone, + /// + /// + /// + ResponseAudioDelta, + /// + /// + /// + ResponseAudioDone, + /// + /// + /// + ResponseFunctionCallArgumentsDelta, + /// + /// + /// + ResponseFunctionCallArgumentsDone, + /// + /// + /// + RateLimitsUpdated, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventDiscriminatorType value) + { + return value switch + { + RealtimeServerEventDiscriminatorType.Error => "error", + RealtimeServerEventDiscriminatorType.SessionCreated => "session.created", + RealtimeServerEventDiscriminatorType.SessionUpdated => "session.updated", + RealtimeServerEventDiscriminatorType.ConversationCreated => "conversation.created", + RealtimeServerEventDiscriminatorType.ConversationItemCreated => "conversation.item.created", + RealtimeServerEventDiscriminatorType.ConversationItemInputAudioTranscriptionCompleted => "conversation.item.input_audio_transcription.completed", + RealtimeServerEventDiscriminatorType.ConversationItemInputAudioTranscriptionFailed => "conversation.item.input_audio_transcription.failed", + RealtimeServerEventDiscriminatorType.ConversationItemTruncated => "conversation.item.truncated", + RealtimeServerEventDiscriminatorType.ConversationItemDeleted => "conversation.item.deleted", + RealtimeServerEventDiscriminatorType.InputAudioBufferCommitted => "input_audio_buffer.committed", + RealtimeServerEventDiscriminatorType.InputAudioBufferCleared => "input_audio_buffer.cleared", + RealtimeServerEventDiscriminatorType.InputAudioBufferSpeechStarted => "input_audio_buffer.speech_started", + RealtimeServerEventDiscriminatorType.InputAudioBufferSpeechStopped => "input_audio_buffer.speech_stopped", + RealtimeServerEventDiscriminatorType.ResponseCreated => "response.created", + RealtimeServerEventDiscriminatorType.ResponseDone => "response.done", + RealtimeServerEventDiscriminatorType.ResponseOutputItemAdded => "response.output_item.added", + RealtimeServerEventDiscriminatorType.ResponseOutputItemDone => "response.output_item.done", + RealtimeServerEventDiscriminatorType.ResponseContentPartAdded => "response.content_part.added", + RealtimeServerEventDiscriminatorType.ResponseContentPartDone => "response.content_part.done", + RealtimeServerEventDiscriminatorType.ResponseTextDelta => "response.text.delta", + RealtimeServerEventDiscriminatorType.ResponseTextDone => "response.text.done", + RealtimeServerEventDiscriminatorType.ResponseAudioTranscriptDelta => "response.audio_transcript.delta", + RealtimeServerEventDiscriminatorType.ResponseAudioTranscriptDone => "response.audio_transcript.done", + RealtimeServerEventDiscriminatorType.ResponseAudioDelta => "response.audio.delta", + RealtimeServerEventDiscriminatorType.ResponseAudioDone => "response.audio.done", + RealtimeServerEventDiscriminatorType.ResponseFunctionCallArgumentsDelta => "response.function_call_arguments.delta", + RealtimeServerEventDiscriminatorType.ResponseFunctionCallArgumentsDone => "response.function_call_arguments.done", + RealtimeServerEventDiscriminatorType.RateLimitsUpdated => "rate_limits.updated", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventDiscriminatorType? ToEnum(string value) + { + return value switch + { + "error" => RealtimeServerEventDiscriminatorType.Error, + "session.created" => RealtimeServerEventDiscriminatorType.SessionCreated, + "session.updated" => RealtimeServerEventDiscriminatorType.SessionUpdated, + "conversation.created" => RealtimeServerEventDiscriminatorType.ConversationCreated, + "conversation.item.created" => RealtimeServerEventDiscriminatorType.ConversationItemCreated, + "conversation.item.input_audio_transcription.completed" => RealtimeServerEventDiscriminatorType.ConversationItemInputAudioTranscriptionCompleted, + "conversation.item.input_audio_transcription.failed" => RealtimeServerEventDiscriminatorType.ConversationItemInputAudioTranscriptionFailed, + "conversation.item.truncated" => RealtimeServerEventDiscriminatorType.ConversationItemTruncated, + "conversation.item.deleted" => RealtimeServerEventDiscriminatorType.ConversationItemDeleted, + "input_audio_buffer.committed" => RealtimeServerEventDiscriminatorType.InputAudioBufferCommitted, + "input_audio_buffer.cleared" => RealtimeServerEventDiscriminatorType.InputAudioBufferCleared, + "input_audio_buffer.speech_started" => RealtimeServerEventDiscriminatorType.InputAudioBufferSpeechStarted, + "input_audio_buffer.speech_stopped" => RealtimeServerEventDiscriminatorType.InputAudioBufferSpeechStopped, + "response.created" => RealtimeServerEventDiscriminatorType.ResponseCreated, + "response.done" => RealtimeServerEventDiscriminatorType.ResponseDone, + "response.output_item.added" => RealtimeServerEventDiscriminatorType.ResponseOutputItemAdded, + "response.output_item.done" => RealtimeServerEventDiscriminatorType.ResponseOutputItemDone, + "response.content_part.added" => RealtimeServerEventDiscriminatorType.ResponseContentPartAdded, + "response.content_part.done" => RealtimeServerEventDiscriminatorType.ResponseContentPartDone, + "response.text.delta" => RealtimeServerEventDiscriminatorType.ResponseTextDelta, + "response.text.done" => RealtimeServerEventDiscriminatorType.ResponseTextDone, + "response.audio_transcript.delta" => RealtimeServerEventDiscriminatorType.ResponseAudioTranscriptDelta, + "response.audio_transcript.done" => RealtimeServerEventDiscriminatorType.ResponseAudioTranscriptDone, + "response.audio.delta" => RealtimeServerEventDiscriminatorType.ResponseAudioDelta, + "response.audio.done" => RealtimeServerEventDiscriminatorType.ResponseAudioDone, + "response.function_call_arguments.delta" => RealtimeServerEventDiscriminatorType.ResponseFunctionCallArgumentsDelta, + "response.function_call_arguments.done" => RealtimeServerEventDiscriminatorType.ResponseFunctionCallArgumentsDone, + "rate_limits.updated" => RealtimeServerEventDiscriminatorType.RateLimitsUpdated, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ResponseFormat.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ResponseFormat.g.cs new file mode 100644 index 00000000..48bd9955 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ResponseFormat.g.cs @@ -0,0 +1,334 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// An object specifying the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4o mini](/docs/models/gpt-4o-mini), [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
+ /// Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).
+ /// Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
+ /// **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length. + ///
+ public readonly partial struct ResponseFormat : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType? Type { get; } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.ResponseFormatText? Text { get; init; } +#else + public global::OpenAI.ResponseFormatText? Text { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] +#endif + public bool IsText => Text != null; + + /// + /// + /// + public static implicit operator ResponseFormat(global::OpenAI.ResponseFormatText value) => new ResponseFormat(value); + + /// + /// + /// + public static implicit operator global::OpenAI.ResponseFormatText?(ResponseFormat @this) => @this.Text; + + /// + /// + /// + public ResponseFormat(global::OpenAI.ResponseFormatText? value) + { + Text = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.ResponseFormatJsonObject? JsonObject { get; init; } +#else + public global::OpenAI.ResponseFormatJsonObject? JsonObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JsonObject))] +#endif + public bool IsJsonObject => JsonObject != null; + + /// + /// + /// + public static implicit operator ResponseFormat(global::OpenAI.ResponseFormatJsonObject value) => new ResponseFormat(value); + + /// + /// + /// + public static implicit operator global::OpenAI.ResponseFormatJsonObject?(ResponseFormat @this) => @this.JsonObject; + + /// + /// + /// + public ResponseFormat(global::OpenAI.ResponseFormatJsonObject? value) + { + JsonObject = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.ResponseFormatJsonSchema? JsonSchema { get; init; } +#else + public global::OpenAI.ResponseFormatJsonSchema? JsonSchema { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JsonSchema))] +#endif + public bool IsJsonSchema => JsonSchema != null; + + /// + /// + /// + public static implicit operator ResponseFormat(global::OpenAI.ResponseFormatJsonSchema value) => new ResponseFormat(value); + + /// + /// + /// + public static implicit operator global::OpenAI.ResponseFormatJsonSchema?(ResponseFormat @this) => @this.JsonSchema; + + /// + /// + /// + public ResponseFormat(global::OpenAI.ResponseFormatJsonSchema? value) + { + JsonSchema = value; + } + + /// + /// + /// + public ResponseFormat( + global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType? type, + global::OpenAI.ResponseFormatText? text, + global::OpenAI.ResponseFormatJsonObject? jsonObject, + global::OpenAI.ResponseFormatJsonSchema? jsonSchema + ) + { + Type = type; + + Text = text; + JsonObject = jsonObject; + JsonSchema = jsonSchema; + } + + /// + /// + /// + public object? Object => + JsonSchema as object ?? + JsonObject as object ?? + Text as object + ; + + /// + /// + /// + public bool Validate() + { + return IsText && !IsJsonObject && !IsJsonSchema || !IsText && IsJsonObject && !IsJsonSchema || !IsText && !IsJsonObject && IsJsonSchema; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? text = null, + global::System.Func? jsonObject = null, + global::System.Func? jsonSchema = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsText && text != null) + { + return text(Text!); + } + else if (IsJsonObject && jsonObject != null) + { + return jsonObject(JsonObject!); + } + else if (IsJsonSchema && jsonSchema != null) + { + return jsonSchema(JsonSchema!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? text = null, + global::System.Action? jsonObject = null, + global::System.Action? jsonSchema = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsText) + { + text?.Invoke(Text!); + } + else if (IsJsonObject) + { + jsonObject?.Invoke(JsonObject!); + } + else if (IsJsonSchema) + { + jsonSchema?.Invoke(JsonSchema!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Text, + typeof(global::OpenAI.ResponseFormatText), + JsonObject, + typeof(global::OpenAI.ResponseFormatJsonObject), + JsonSchema, + typeof(global::OpenAI.ResponseFormatJsonSchema), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ResponseFormat other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(JsonObject, other.JsonObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(JsonSchema, other.JsonSchema) + ; + } + + /// + /// + /// + public static bool operator ==(ResponseFormat obj1, ResponseFormat obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ResponseFormat obj1, ResponseFormat obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ResponseFormat o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ResponseFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ResponseFormat), + jsonSerializerContext) as global::OpenAI.ResponseFormat?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ResponseFormat? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunObject.g.cs index de3bf7c5..a2b8b094 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunObject.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunObject.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -134,7 +132,7 @@ public sealed partial class RunObject ///
[global::System.Text.Json.Serialization.JsonPropertyName("tools")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> Tools { get; set; } + public required global::System.Collections.Generic.IList Tools { get; set; } /// /// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunObjectToolDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunObjectToolDiscriminator.g.cs new file mode 100644 index 00000000..9124af2f --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunObjectToolDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class RunObjectToolDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunObjectToolDiscriminatorTypeJsonConverter))] + public global::OpenAI.RunObjectToolDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RunObjectToolDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RunObjectToolDiscriminator), + jsonSerializerContext) as global::OpenAI.RunObjectToolDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RunObjectToolDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunObjectToolDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunObjectToolDiscriminatorType.g.cs new file mode 100644 index 00000000..da3119e4 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunObjectToolDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum RunObjectToolDiscriminatorType + { + /// + /// + /// + CodeInterpreter, + /// + /// + /// + FileSearch, + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunObjectToolDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunObjectToolDiscriminatorType value) + { + return value switch + { + RunObjectToolDiscriminatorType.CodeInterpreter => "code_interpreter", + RunObjectToolDiscriminatorType.FileSearch => "file_search", + RunObjectToolDiscriminatorType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunObjectToolDiscriminatorType? ToEnum(string value) + { + return value switch + { + "code_interpreter" => RunObjectToolDiscriminatorType.CodeInterpreter, + "file_search" => RunObjectToolDiscriminatorType.FileSearch, + "function" => RunObjectToolDiscriminatorType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDelta.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDelta.g.cs index a005b2aa..be20a599 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDelta.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDelta.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -14,8 +12,8 @@ public sealed partial class RunStepDeltaObjectDelta /// The details of the run step. /// [global::System.Text.Json.Serialization.JsonPropertyName("step_details")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))] - public global::OpenAI.OneOf? StepDetails { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepDeltaObjectDeltaStepDetailsJsonConverter))] + public global::OpenAI.RunStepDeltaObjectDeltaStepDetails? StepDetails { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDeltaStepDetails.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDeltaStepDetails.g.cs new file mode 100644 index 00000000..3de0ca21 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDeltaStepDetails.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// The details of the run step. + /// + public readonly partial struct RunStepDeltaObjectDeltaStepDetails : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType? Type { get; } + + /// + /// Details of the message creation by the run step. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject? MessageCreation { get; init; } +#else + public global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject? MessageCreation { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageCreation))] +#endif + public bool IsMessageCreation => MessageCreation != null; + + /// + /// + /// + public static implicit operator RunStepDeltaObjectDeltaStepDetails(global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject value) => new RunStepDeltaObjectDeltaStepDetails(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject?(RunStepDeltaObjectDeltaStepDetails @this) => @this.MessageCreation; + + /// + /// + /// + public RunStepDeltaObjectDeltaStepDetails(global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject? value) + { + MessageCreation = value; + } + + /// + /// Details of the tool call. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDeltaStepDetailsToolCallsObject? ToolCalls { get; init; } +#else + public global::OpenAI.RunStepDeltaStepDetailsToolCallsObject? ToolCalls { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCalls))] +#endif + public bool IsToolCalls => ToolCalls != null; + + /// + /// + /// + public static implicit operator RunStepDeltaObjectDeltaStepDetails(global::OpenAI.RunStepDeltaStepDetailsToolCallsObject value) => new RunStepDeltaObjectDeltaStepDetails(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDeltaStepDetailsToolCallsObject?(RunStepDeltaObjectDeltaStepDetails @this) => @this.ToolCalls; + + /// + /// + /// + public RunStepDeltaObjectDeltaStepDetails(global::OpenAI.RunStepDeltaStepDetailsToolCallsObject? value) + { + ToolCalls = value; + } + + /// + /// + /// + public RunStepDeltaObjectDeltaStepDetails( + global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType? type, + global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject? messageCreation, + global::OpenAI.RunStepDeltaStepDetailsToolCallsObject? toolCalls + ) + { + Type = type; + + MessageCreation = messageCreation; + ToolCalls = toolCalls; + } + + /// + /// + /// + public object? Object => + ToolCalls as object ?? + MessageCreation as object + ; + + /// + /// + /// + public bool Validate() + { + return IsMessageCreation && !IsToolCalls || !IsMessageCreation && IsToolCalls; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? messageCreation = null, + global::System.Func? toolCalls = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageCreation && messageCreation != null) + { + return messageCreation(MessageCreation!); + } + else if (IsToolCalls && toolCalls != null) + { + return toolCalls(ToolCalls!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? messageCreation = null, + global::System.Action? toolCalls = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageCreation) + { + messageCreation?.Invoke(MessageCreation!); + } + else if (IsToolCalls) + { + toolCalls?.Invoke(ToolCalls!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + MessageCreation, + typeof(global::OpenAI.RunStepDeltaStepDetailsMessageCreationObject), + ToolCalls, + typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsObject), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(RunStepDeltaObjectDeltaStepDetails other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageCreation, other.MessageCreation) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCalls, other.ToolCalls) + ; + } + + /// + /// + /// + public static bool operator ==(RunStepDeltaObjectDeltaStepDetails obj1, RunStepDeltaObjectDeltaStepDetails obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(RunStepDeltaObjectDeltaStepDetails obj1, RunStepDeltaObjectDeltaStepDetails obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is RunStepDeltaObjectDeltaStepDetails o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RunStepDeltaObjectDeltaStepDetails? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RunStepDeltaObjectDeltaStepDetails), + jsonSerializerContext) as global::OpenAI.RunStepDeltaObjectDeltaStepDetails?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RunStepDeltaObjectDeltaStepDetails? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminator.g.cs new file mode 100644 index 00000000..bf5d55fb --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class RunStepDeltaObjectDeltaStepDetailsDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeJsonConverter))] + public global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator), + jsonSerializerContext) as global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.g.cs new file mode 100644 index 00000000..9b20d6aa --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum RunStepDeltaObjectDeltaStepDetailsDiscriminatorType + { + /// + /// + /// + MessageCreation, + /// + /// + /// + ToolCalls, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunStepDeltaObjectDeltaStepDetailsDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunStepDeltaObjectDeltaStepDetailsDiscriminatorType value) + { + return value switch + { + RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.MessageCreation => "message_creation", + RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.ToolCalls => "tool_calls", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunStepDeltaObjectDeltaStepDetailsDiscriminatorType? ToEnum(string value) + { + return value switch + { + "message_creation" => RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.MessageCreation, + "tool_calls" => RunStepDeltaObjectDeltaStepDetailsDiscriminatorType.ToolCalls, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs index de8e3b6e..bd3086a9 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -20,7 +18,7 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterp /// The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type. /// [global::System.Text.Json.Serialization.JsonPropertyName("outputs")] - public global::System.Collections.Generic.IList>? Outputs { get; set; } + public global::System.Collections.Generic.IList? Outputs { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs new file mode 100644 index 00000000..9404e9de --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? Type { get; } + + /// + /// Text output from the Code Interpreter tool call as part of a run step. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? Logs { get; init; } +#else + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? Logs { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Logs))] +#endif + public bool IsLogs => Logs != null; + + /// + /// + /// + public static implicit operator RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject value) => new RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject?(RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput @this) => @this.Logs; + + /// + /// + /// + public RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? value) + { + Logs = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? Image { get; init; } +#else + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? Image { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Image))] +#endif + public bool IsImage => Image != null; + + /// + /// + /// + public static implicit operator RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject value) => new RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject?(RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput @this) => @this.Image; + + /// + /// + /// + public RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? value) + { + Image = value; + } + + /// + /// + /// + public RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput( + global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? type, + global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? logs, + global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? image + ) + { + Type = type; + + Logs = logs; + Image = image; + } + + /// + /// + /// + public object? Object => + Image as object ?? + Logs as object + ; + + /// + /// + /// + public bool Validate() + { + return IsLogs && !IsImage || !IsLogs && IsImage; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? logs = null, + global::System.Func? image = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLogs && logs != null) + { + return logs(Logs!); + } + else if (IsImage && image != null) + { + return image(Image!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? logs = null, + global::System.Action? image = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLogs) + { + logs?.Invoke(Logs!); + } + else if (IsImage) + { + image?.Invoke(Image!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Logs, + typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject), + Image, + typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Logs, other.Logs) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Image, other.Image) + ; + } + + /// + /// + /// + public static bool operator ==(RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput obj1, RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput obj1, RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput), + jsonSerializerContext) as global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs new file mode 100644 index 00000000..c12b76f8 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeJsonConverter))] + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator), + jsonSerializerContext) as global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs new file mode 100644 index 00000000..5553b3a2 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType + { + /// + /// + /// + Logs, + /// + /// + /// + Image, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType value) + { + return value switch + { + RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Logs => "logs", + RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Image => "image", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? ToEnum(string value) + { + return value switch + { + "logs" => RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Logs, + "image" => RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Image, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsObject.g.cs index 6f9d5f4a..0e8eb7d9 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsObject.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsObject.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -21,7 +19,7 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsObject /// An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`. /// [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] - public global::System.Collections.Generic.IList>? ToolCalls { get; set; } + public global::System.Collections.Generic.IList? ToolCalls { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator.g.cs new file mode 100644 index 00000000..a8ad3eab --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeJsonConverter))] + public global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator), + jsonSerializerContext) as global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs new file mode 100644 index 00000000..bc6c04e0 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType + { + /// + /// + /// + CodeInterpreter, + /// + /// + /// + FileSearch, + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType value) + { + return value switch + { + RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.CodeInterpreter => "code_interpreter", + RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.FileSearch => "file_search", + RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType? ToEnum(string value) + { + return value switch + { + "code_interpreter" => RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.CodeInterpreter, + "file_search" => RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.FileSearch, + "function" => RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs index 9ec2e5c1..97530bd3 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -22,7 +20,7 @@ public sealed partial class RunStepDetailsToolCallsCodeObjectCodeInterpreter /// [global::System.Text.Json.Serialization.JsonPropertyName("outputs")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> Outputs { get; set; } + public required global::System.Collections.Generic.IList Outputs { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs new file mode 100644 index 00000000..6771a4aa --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? Type { get; } + + /// + /// Text output from the Code Interpreter tool call as part of a run step. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? Logs { get; init; } +#else + public global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? Logs { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Logs))] +#endif + public bool IsLogs => Logs != null; + + /// + /// + /// + public static implicit operator RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject value) => new RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject?(RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput @this) => @this.Logs; + + /// + /// + /// + public RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? value) + { + Logs = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? Image { get; init; } +#else + public global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? Image { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Image))] +#endif + public bool IsImage => Image != null; + + /// + /// + /// + public static implicit operator RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject value) => new RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject?(RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput @this) => @this.Image; + + /// + /// + /// + public RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? value) + { + Image = value; + } + + /// + /// + /// + public RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput( + global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? type, + global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? logs, + global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? image + ) + { + Type = type; + + Logs = logs; + Image = image; + } + + /// + /// + /// + public object? Object => + Image as object ?? + Logs as object + ; + + /// + /// + /// + public bool Validate() + { + return IsLogs && !IsImage || !IsLogs && IsImage; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? logs = null, + global::System.Func? image = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLogs && logs != null) + { + return logs(Logs!); + } + else if (IsImage && image != null) + { + return image(Image!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? logs = null, + global::System.Action? image = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLogs) + { + logs?.Invoke(Logs!); + } + else if (IsImage) + { + image?.Invoke(Image!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Logs, + typeof(global::OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject), + Image, + typeof(global::OpenAI.RunStepDetailsToolCallsCodeOutputImageObject), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Logs, other.Logs) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Image, other.Image) + ; + } + + /// + /// + /// + public static bool operator ==(RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput obj1, RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput obj1, RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput), + jsonSerializerContext) as global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs new file mode 100644 index 00000000..b66d512c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeJsonConverter))] + public global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator), + jsonSerializerContext) as global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs new file mode 100644 index 00000000..d12eebae --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType + { + /// + /// + /// + Logs, + /// + /// + /// + Image, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType value) + { + return value switch + { + RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Logs => "logs", + RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Image => "image", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType? ToEnum(string value) + { + return value switch + { + "logs" => RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Logs, + "image" => RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminatorType.Image, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsObject.g.cs index 74c01af3..5925410f 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsObject.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsObject.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -22,7 +20,7 @@ public sealed partial class RunStepDetailsToolCallsObject /// [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> ToolCalls { get; set; } + public required global::System.Collections.Generic.IList ToolCalls { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsObjectToolCallDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsObjectToolCallDiscriminator.g.cs new file mode 100644 index 00000000..72d25fd4 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsObjectToolCallDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class RunStepDetailsToolCallsObjectToolCallDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeJsonConverter))] + public global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminator), + jsonSerializerContext) as global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs new file mode 100644 index 00000000..19cfab51 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum RunStepDetailsToolCallsObjectToolCallDiscriminatorType + { + /// + /// + /// + CodeInterpreter, + /// + /// + /// + FileSearch, + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunStepDetailsToolCallsObjectToolCallDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunStepDetailsToolCallsObjectToolCallDiscriminatorType value) + { + return value switch + { + RunStepDetailsToolCallsObjectToolCallDiscriminatorType.CodeInterpreter => "code_interpreter", + RunStepDetailsToolCallsObjectToolCallDiscriminatorType.FileSearch => "file_search", + RunStepDetailsToolCallsObjectToolCallDiscriminatorType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunStepDetailsToolCallsObjectToolCallDiscriminatorType? ToEnum(string value) + { + return value switch + { + "code_interpreter" => RunStepDetailsToolCallsObjectToolCallDiscriminatorType.CodeInterpreter, + "file_search" => RunStepDetailsToolCallsObjectToolCallDiscriminatorType.FileSearch, + "function" => RunStepDetailsToolCallsObjectToolCallDiscriminatorType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObject.g.cs index ad6a735b..f4b2f7f8 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObject.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObject.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -73,9 +71,9 @@ public sealed partial class RunStepObject /// The details of the run step. /// [global::System.Text.Json.Serialization.JsonPropertyName("step_details")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepObjectStepDetailsJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::OpenAI.OneOf StepDetails { get; set; } + public required global::OpenAI.RunStepObjectStepDetails StepDetails { get; set; } /// /// The last error associated with this run step. Will be `null` if there are no errors. diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObjectStepDetails.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObjectStepDetails.g.cs new file mode 100644 index 00000000..7c3ce300 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObjectStepDetails.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// The details of the run step. + /// + public readonly partial struct RunStepObjectStepDetails : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.RunStepObjectStepDetailsDiscriminatorType? Type { get; } + + /// + /// Details of the message creation by the run step. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDetailsMessageCreationObject? MessageCreation { get; init; } +#else + public global::OpenAI.RunStepDetailsMessageCreationObject? MessageCreation { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageCreation))] +#endif + public bool IsMessageCreation => MessageCreation != null; + + /// + /// + /// + public static implicit operator RunStepObjectStepDetails(global::OpenAI.RunStepDetailsMessageCreationObject value) => new RunStepObjectStepDetails(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDetailsMessageCreationObject?(RunStepObjectStepDetails @this) => @this.MessageCreation; + + /// + /// + /// + public RunStepObjectStepDetails(global::OpenAI.RunStepDetailsMessageCreationObject? value) + { + MessageCreation = value; + } + + /// + /// Details of the tool call. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDetailsToolCallsObject? ToolCalls { get; init; } +#else + public global::OpenAI.RunStepDetailsToolCallsObject? ToolCalls { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCalls))] +#endif + public bool IsToolCalls => ToolCalls != null; + + /// + /// + /// + public static implicit operator RunStepObjectStepDetails(global::OpenAI.RunStepDetailsToolCallsObject value) => new RunStepObjectStepDetails(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDetailsToolCallsObject?(RunStepObjectStepDetails @this) => @this.ToolCalls; + + /// + /// + /// + public RunStepObjectStepDetails(global::OpenAI.RunStepDetailsToolCallsObject? value) + { + ToolCalls = value; + } + + /// + /// + /// + public RunStepObjectStepDetails( + global::OpenAI.RunStepObjectStepDetailsDiscriminatorType? type, + global::OpenAI.RunStepDetailsMessageCreationObject? messageCreation, + global::OpenAI.RunStepDetailsToolCallsObject? toolCalls + ) + { + Type = type; + + MessageCreation = messageCreation; + ToolCalls = toolCalls; + } + + /// + /// + /// + public object? Object => + ToolCalls as object ?? + MessageCreation as object + ; + + /// + /// + /// + public bool Validate() + { + return IsMessageCreation && !IsToolCalls || !IsMessageCreation && IsToolCalls; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? messageCreation = null, + global::System.Func? toolCalls = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageCreation && messageCreation != null) + { + return messageCreation(MessageCreation!); + } + else if (IsToolCalls && toolCalls != null) + { + return toolCalls(ToolCalls!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? messageCreation = null, + global::System.Action? toolCalls = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessageCreation) + { + messageCreation?.Invoke(MessageCreation!); + } + else if (IsToolCalls) + { + toolCalls?.Invoke(ToolCalls!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + MessageCreation, + typeof(global::OpenAI.RunStepDetailsMessageCreationObject), + ToolCalls, + typeof(global::OpenAI.RunStepDetailsToolCallsObject), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(RunStepObjectStepDetails other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageCreation, other.MessageCreation) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCalls, other.ToolCalls) + ; + } + + /// + /// + /// + public static bool operator ==(RunStepObjectStepDetails obj1, RunStepObjectStepDetails obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(RunStepObjectStepDetails obj1, RunStepObjectStepDetails obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is RunStepObjectStepDetails o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RunStepObjectStepDetails? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RunStepObjectStepDetails), + jsonSerializerContext) as global::OpenAI.RunStepObjectStepDetails?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RunStepObjectStepDetails? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObjectStepDetailsDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObjectStepDetailsDiscriminator.g.cs new file mode 100644 index 00000000..6042664c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObjectStepDetailsDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class RunStepObjectStepDetailsDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RunStepObjectStepDetailsDiscriminatorTypeJsonConverter))] + public global::OpenAI.RunStepObjectStepDetailsDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.RunStepObjectStepDetailsDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.RunStepObjectStepDetailsDiscriminator), + jsonSerializerContext) as global::OpenAI.RunStepObjectStepDetailsDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.RunStepObjectStepDetailsDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObjectStepDetailsDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObjectStepDetailsDiscriminatorType.g.cs new file mode 100644 index 00000000..b8efd009 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepObjectStepDetailsDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum RunStepObjectStepDetailsDiscriminatorType + { + /// + /// + /// + MessageCreation, + /// + /// + /// + ToolCalls, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunStepObjectStepDetailsDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunStepObjectStepDetailsDiscriminatorType value) + { + return value switch + { + RunStepObjectStepDetailsDiscriminatorType.MessageCreation => "message_creation", + RunStepObjectStepDetailsDiscriminatorType.ToolCalls => "tool_calls", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunStepObjectStepDetailsDiscriminatorType? ToEnum(string value) + { + return value switch + { + "message_creation" => RunStepObjectStepDetailsDiscriminatorType.MessageCreation, + "tool_calls" => RunStepObjectStepDetailsDiscriminatorType.ToolCalls, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEvent.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEvent.g.cs deleted file mode 100644 index a1675d2b..00000000 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStepStreamEvent.g.cs +++ /dev/null @@ -1,527 +0,0 @@ -using System.Linq; -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace OpenAI -{ - /// - /// - /// - public readonly partial struct RunStepStreamEvent : global::System.IEquatable - { - /// - /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is created. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStepStreamEventVariant1? Value1 { get; init; } -#else - public global::OpenAI.RunStepStreamEventVariant1? Value1 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] -#endif - public bool IsValue1 => Value1 != null; - - /// - /// - /// - public static implicit operator RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant1 value) => new RunStepStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStepStreamEventVariant1?(RunStepStreamEvent @this) => @this.Value1; - - /// - /// - /// - public RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant1? value) - { - Value1 = value; - } - - /// - /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStepStreamEventVariant2? Value2 { get; init; } -#else - public global::OpenAI.RunStepStreamEventVariant2? Value2 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; - - /// - /// - /// - public static implicit operator RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant2 value) => new RunStepStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStepStreamEventVariant2?(RunStepStreamEvent @this) => @this.Value2; - - /// - /// - /// - public RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant2? value) - { - Value2 = value; - } - - /// - /// Occurs when parts of a [run step](/docs/api-reference/run-steps/step-object) are being streamed. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStepStreamEventVariant3? Value3 { get; init; } -#else - public global::OpenAI.RunStepStreamEventVariant3? Value3 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; - - /// - /// - /// - public static implicit operator RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant3 value) => new RunStepStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStepStreamEventVariant3?(RunStepStreamEvent @this) => @this.Value3; - - /// - /// - /// - public RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant3? value) - { - Value3 = value; - } - - /// - /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is completed. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStepStreamEventVariant4? Value4 { get; init; } -#else - public global::OpenAI.RunStepStreamEventVariant4? Value4 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] -#endif - public bool IsValue4 => Value4 != null; - - /// - /// - /// - public static implicit operator RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant4 value) => new RunStepStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStepStreamEventVariant4?(RunStepStreamEvent @this) => @this.Value4; - - /// - /// - /// - public RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant4? value) - { - Value4 = value; - } - - /// - /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) fails. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStepStreamEventVariant5? Value5 { get; init; } -#else - public global::OpenAI.RunStepStreamEventVariant5? Value5 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] -#endif - public bool IsValue5 => Value5 != null; - - /// - /// - /// - public static implicit operator RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant5 value) => new RunStepStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStepStreamEventVariant5?(RunStepStreamEvent @this) => @this.Value5; - - /// - /// - /// - public RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant5? value) - { - Value5 = value; - } - - /// - /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is cancelled. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStepStreamEventVariant6? Value6 { get; init; } -#else - public global::OpenAI.RunStepStreamEventVariant6? Value6 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] -#endif - public bool IsValue6 => Value6 != null; - - /// - /// - /// - public static implicit operator RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant6 value) => new RunStepStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStepStreamEventVariant6?(RunStepStreamEvent @this) => @this.Value6; - - /// - /// - /// - public RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant6? value) - { - Value6 = value; - } - - /// - /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) expires. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStepStreamEventVariant7? Value7 { get; init; } -#else - public global::OpenAI.RunStepStreamEventVariant7? Value7 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] -#endif - public bool IsValue7 => Value7 != null; - - /// - /// - /// - public static implicit operator RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant7 value) => new RunStepStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStepStreamEventVariant7?(RunStepStreamEvent @this) => @this.Value7; - - /// - /// - /// - public RunStepStreamEvent(global::OpenAI.RunStepStreamEventVariant7? value) - { - Value7 = value; - } - - /// - /// - /// - public RunStepStreamEvent( - global::OpenAI.RunStepStreamEventVariant1? value1, - global::OpenAI.RunStepStreamEventVariant2? value2, - global::OpenAI.RunStepStreamEventVariant3? value3, - global::OpenAI.RunStepStreamEventVariant4? value4, - global::OpenAI.RunStepStreamEventVariant5? value5, - global::OpenAI.RunStepStreamEventVariant6? value6, - global::OpenAI.RunStepStreamEventVariant7? value7 - ) - { - Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; - Value5 = value5; - Value6 = value6; - Value7 = value7; - } - - /// - /// - /// - public object? Object => - Value7 as object ?? - Value6 as object ?? - Value5 as object ?? - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public bool Validate() - { - return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && IsValue5 && !IsValue6 && !IsValue7 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && IsValue6 && !IsValue7 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && IsValue7; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, - global::System.Func? value4 = null, - global::System.Func? value5 = null, - global::System.Func? value6 = null, - global::System.Func? value7 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1 && value1 != null) - { - return value1(Value1!); - } - else if (IsValue2 && value2 != null) - { - return value2(Value2!); - } - else if (IsValue3 && value3 != null) - { - return value3(Value3!); - } - else if (IsValue4 && value4 != null) - { - return value4(Value4!); - } - else if (IsValue5 && value5 != null) - { - return value5(Value5!); - } - else if (IsValue6 && value6 != null) - { - return value6(Value6!); - } - else if (IsValue7 && value7 != null) - { - return value7(Value7!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, - global::System.Action? value4 = null, - global::System.Action? value5 = null, - global::System.Action? value6 = null, - global::System.Action? value7 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1) - { - value1?.Invoke(Value1!); - } - else if (IsValue2) - { - value2?.Invoke(Value2!); - } - else if (IsValue3) - { - value3?.Invoke(Value3!); - } - else if (IsValue4) - { - value4?.Invoke(Value4!); - } - else if (IsValue5) - { - value5?.Invoke(Value5!); - } - else if (IsValue6) - { - value6?.Invoke(Value6!); - } - else if (IsValue7) - { - value7?.Invoke(Value7!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Value1, - typeof(global::OpenAI.RunStepStreamEventVariant1), - Value2, - typeof(global::OpenAI.RunStepStreamEventVariant2), - Value3, - typeof(global::OpenAI.RunStepStreamEventVariant3), - Value4, - typeof(global::OpenAI.RunStepStreamEventVariant4), - Value5, - typeof(global::OpenAI.RunStepStreamEventVariant5), - Value6, - typeof(global::OpenAI.RunStepStreamEventVariant6), - Value7, - typeof(global::OpenAI.RunStepStreamEventVariant7), - }; - const int offset = unchecked((int)2166136261); - const int prime = 16777619; - static int HashCodeAggregator(int hashCode, object? value) => value == null - ? (hashCode ^ 0) * prime - : (hashCode ^ value.GetHashCode()) * prime; - return fields.Aggregate(offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(RunStepStreamEvent other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value3, other.Value3) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value6, other.Value6) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value7, other.Value7) - ; - } - - /// - /// - /// - public static bool operator ==(RunStepStreamEvent obj1, RunStepStreamEvent obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(RunStepStreamEvent obj1, RunStepStreamEvent obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is RunStepStreamEvent o && Equals(o); - } - - - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. - /// - public string ToJson( - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - this.GetType(), - jsonSerializerContext); - } - - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public string ToJson( - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::OpenAI.RunStepStreamEvent? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::OpenAI.RunStepStreamEvent), - jsonSerializerContext) as global::OpenAI.RunStepStreamEvent?; - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public static global::OpenAI.RunStepStreamEvent? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - } -} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEvent.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEvent.g.cs deleted file mode 100644 index 26afb436..00000000 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RunStreamEvent.g.cs +++ /dev/null @@ -1,680 +0,0 @@ -using System.Linq; -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace OpenAI -{ - /// - /// - /// - public readonly partial struct RunStreamEvent : global::System.IEquatable - { - /// - /// Occurs when a new [run](/docs/api-reference/runs/object) is created. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStreamEventVariant1? Value1 { get; init; } -#else - public global::OpenAI.RunStreamEventVariant1? Value1 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] -#endif - public bool IsValue1 => Value1 != null; - - /// - /// - /// - public static implicit operator RunStreamEvent(global::OpenAI.RunStreamEventVariant1 value) => new RunStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStreamEventVariant1?(RunStreamEvent @this) => @this.Value1; - - /// - /// - /// - public RunStreamEvent(global::OpenAI.RunStreamEventVariant1? value) - { - Value1 = value; - } - - /// - /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `queued` status. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStreamEventVariant2? Value2 { get; init; } -#else - public global::OpenAI.RunStreamEventVariant2? Value2 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; - - /// - /// - /// - public static implicit operator RunStreamEvent(global::OpenAI.RunStreamEventVariant2 value) => new RunStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStreamEventVariant2?(RunStreamEvent @this) => @this.Value2; - - /// - /// - /// - public RunStreamEvent(global::OpenAI.RunStreamEventVariant2? value) - { - Value2 = value; - } - - /// - /// Occurs when a [run](/docs/api-reference/runs/object) moves to an `in_progress` status. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStreamEventVariant3? Value3 { get; init; } -#else - public global::OpenAI.RunStreamEventVariant3? Value3 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; - - /// - /// - /// - public static implicit operator RunStreamEvent(global::OpenAI.RunStreamEventVariant3 value) => new RunStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStreamEventVariant3?(RunStreamEvent @this) => @this.Value3; - - /// - /// - /// - public RunStreamEvent(global::OpenAI.RunStreamEventVariant3? value) - { - Value3 = value; - } - - /// - /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `requires_action` status. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStreamEventVariant4? Value4 { get; init; } -#else - public global::OpenAI.RunStreamEventVariant4? Value4 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] -#endif - public bool IsValue4 => Value4 != null; - - /// - /// - /// - public static implicit operator RunStreamEvent(global::OpenAI.RunStreamEventVariant4 value) => new RunStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStreamEventVariant4?(RunStreamEvent @this) => @this.Value4; - - /// - /// - /// - public RunStreamEvent(global::OpenAI.RunStreamEventVariant4? value) - { - Value4 = value; - } - - /// - /// Occurs when a [run](/docs/api-reference/runs/object) is completed. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStreamEventVariant5? Value5 { get; init; } -#else - public global::OpenAI.RunStreamEventVariant5? Value5 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] -#endif - public bool IsValue5 => Value5 != null; - - /// - /// - /// - public static implicit operator RunStreamEvent(global::OpenAI.RunStreamEventVariant5 value) => new RunStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStreamEventVariant5?(RunStreamEvent @this) => @this.Value5; - - /// - /// - /// - public RunStreamEvent(global::OpenAI.RunStreamEventVariant5? value) - { - Value5 = value; - } - - /// - /// Occurs when a [run](/docs/api-reference/runs/object) ends with status `incomplete`. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStreamEventVariant6? Value6 { get; init; } -#else - public global::OpenAI.RunStreamEventVariant6? Value6 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] -#endif - public bool IsValue6 => Value6 != null; - - /// - /// - /// - public static implicit operator RunStreamEvent(global::OpenAI.RunStreamEventVariant6 value) => new RunStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStreamEventVariant6?(RunStreamEvent @this) => @this.Value6; - - /// - /// - /// - public RunStreamEvent(global::OpenAI.RunStreamEventVariant6? value) - { - Value6 = value; - } - - /// - /// Occurs when a [run](/docs/api-reference/runs/object) fails. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStreamEventVariant7? Value7 { get; init; } -#else - public global::OpenAI.RunStreamEventVariant7? Value7 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] -#endif - public bool IsValue7 => Value7 != null; - - /// - /// - /// - public static implicit operator RunStreamEvent(global::OpenAI.RunStreamEventVariant7 value) => new RunStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStreamEventVariant7?(RunStreamEvent @this) => @this.Value7; - - /// - /// - /// - public RunStreamEvent(global::OpenAI.RunStreamEventVariant7? value) - { - Value7 = value; - } - - /// - /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `cancelling` status. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStreamEventVariant8? Value8 { get; init; } -#else - public global::OpenAI.RunStreamEventVariant8? Value8 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value8))] -#endif - public bool IsValue8 => Value8 != null; - - /// - /// - /// - public static implicit operator RunStreamEvent(global::OpenAI.RunStreamEventVariant8 value) => new RunStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStreamEventVariant8?(RunStreamEvent @this) => @this.Value8; - - /// - /// - /// - public RunStreamEvent(global::OpenAI.RunStreamEventVariant8? value) - { - Value8 = value; - } - - /// - /// Occurs when a [run](/docs/api-reference/runs/object) is cancelled. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStreamEventVariant9? Value9 { get; init; } -#else - public global::OpenAI.RunStreamEventVariant9? Value9 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value9))] -#endif - public bool IsValue9 => Value9 != null; - - /// - /// - /// - public static implicit operator RunStreamEvent(global::OpenAI.RunStreamEventVariant9 value) => new RunStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStreamEventVariant9?(RunStreamEvent @this) => @this.Value9; - - /// - /// - /// - public RunStreamEvent(global::OpenAI.RunStreamEventVariant9? value) - { - Value9 = value; - } - - /// - /// Occurs when a [run](/docs/api-reference/runs/object) expires. - /// -#if NET6_0_OR_GREATER - public global::OpenAI.RunStreamEventVariant10? Value10 { get; init; } -#else - public global::OpenAI.RunStreamEventVariant10? Value10 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value10))] -#endif - public bool IsValue10 => Value10 != null; - - /// - /// - /// - public static implicit operator RunStreamEvent(global::OpenAI.RunStreamEventVariant10 value) => new RunStreamEvent(value); - - /// - /// - /// - public static implicit operator global::OpenAI.RunStreamEventVariant10?(RunStreamEvent @this) => @this.Value10; - - /// - /// - /// - public RunStreamEvent(global::OpenAI.RunStreamEventVariant10? value) - { - Value10 = value; - } - - /// - /// - /// - public RunStreamEvent( - global::OpenAI.RunStreamEventVariant1? value1, - global::OpenAI.RunStreamEventVariant2? value2, - global::OpenAI.RunStreamEventVariant3? value3, - global::OpenAI.RunStreamEventVariant4? value4, - global::OpenAI.RunStreamEventVariant5? value5, - global::OpenAI.RunStreamEventVariant6? value6, - global::OpenAI.RunStreamEventVariant7? value7, - global::OpenAI.RunStreamEventVariant8? value8, - global::OpenAI.RunStreamEventVariant9? value9, - global::OpenAI.RunStreamEventVariant10? value10 - ) - { - Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; - Value5 = value5; - Value6 = value6; - Value7 = value7; - Value8 = value8; - Value9 = value9; - Value10 = value10; - } - - /// - /// - /// - public object? Object => - Value10 as object ?? - Value9 as object ?? - Value8 as object ?? - Value7 as object ?? - Value6 as object ?? - Value5 as object ?? - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public bool Validate() - { - return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && IsValue8 && !IsValue9 && !IsValue10 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && IsValue9 && !IsValue10 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && IsValue10; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, - global::System.Func? value4 = null, - global::System.Func? value5 = null, - global::System.Func? value6 = null, - global::System.Func? value7 = null, - global::System.Func? value8 = null, - global::System.Func? value9 = null, - global::System.Func? value10 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1 && value1 != null) - { - return value1(Value1!); - } - else if (IsValue2 && value2 != null) - { - return value2(Value2!); - } - else if (IsValue3 && value3 != null) - { - return value3(Value3!); - } - else if (IsValue4 && value4 != null) - { - return value4(Value4!); - } - else if (IsValue5 && value5 != null) - { - return value5(Value5!); - } - else if (IsValue6 && value6 != null) - { - return value6(Value6!); - } - else if (IsValue7 && value7 != null) - { - return value7(Value7!); - } - else if (IsValue8 && value8 != null) - { - return value8(Value8!); - } - else if (IsValue9 && value9 != null) - { - return value9(Value9!); - } - else if (IsValue10 && value10 != null) - { - return value10(Value10!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, - global::System.Action? value4 = null, - global::System.Action? value5 = null, - global::System.Action? value6 = null, - global::System.Action? value7 = null, - global::System.Action? value8 = null, - global::System.Action? value9 = null, - global::System.Action? value10 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1) - { - value1?.Invoke(Value1!); - } - else if (IsValue2) - { - value2?.Invoke(Value2!); - } - else if (IsValue3) - { - value3?.Invoke(Value3!); - } - else if (IsValue4) - { - value4?.Invoke(Value4!); - } - else if (IsValue5) - { - value5?.Invoke(Value5!); - } - else if (IsValue6) - { - value6?.Invoke(Value6!); - } - else if (IsValue7) - { - value7?.Invoke(Value7!); - } - else if (IsValue8) - { - value8?.Invoke(Value8!); - } - else if (IsValue9) - { - value9?.Invoke(Value9!); - } - else if (IsValue10) - { - value10?.Invoke(Value10!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Value1, - typeof(global::OpenAI.RunStreamEventVariant1), - Value2, - typeof(global::OpenAI.RunStreamEventVariant2), - Value3, - typeof(global::OpenAI.RunStreamEventVariant3), - Value4, - typeof(global::OpenAI.RunStreamEventVariant4), - Value5, - typeof(global::OpenAI.RunStreamEventVariant5), - Value6, - typeof(global::OpenAI.RunStreamEventVariant6), - Value7, - typeof(global::OpenAI.RunStreamEventVariant7), - Value8, - typeof(global::OpenAI.RunStreamEventVariant8), - Value9, - typeof(global::OpenAI.RunStreamEventVariant9), - Value10, - typeof(global::OpenAI.RunStreamEventVariant10), - }; - const int offset = unchecked((int)2166136261); - const int prime = 16777619; - static int HashCodeAggregator(int hashCode, object? value) => value == null - ? (hashCode ^ 0) * prime - : (hashCode ^ value.GetHashCode()) * prime; - return fields.Aggregate(offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(RunStreamEvent other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value3, other.Value3) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value6, other.Value6) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value7, other.Value7) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value8, other.Value8) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value9, other.Value9) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value10, other.Value10) - ; - } - - /// - /// - /// - public static bool operator ==(RunStreamEvent obj1, RunStreamEvent obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(RunStreamEvent obj1, RunStreamEvent obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is RunStreamEvent o && Equals(o); - } - - - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. - /// - public string ToJson( - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - this.GetType(), - jsonSerializerContext); - } - - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public string ToJson( - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::OpenAI.RunStreamEvent? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::OpenAI.RunStreamEvent), - jsonSerializerContext) as global::OpenAI.RunStreamEvent?; - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public static global::OpenAI.RunStreamEvent? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - } -} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ToolCallsItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ToolCallsItem.g.cs new file mode 100644 index 00000000..457ec6ee --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ToolCallsItem.g.cs @@ -0,0 +1,331 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ToolCallsItem : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType? Type { get; } + + /// + /// Details of the Code Interpreter tool call the run step was involved in. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? RunStepDeltaDetailsCodeObject { get; init; } +#else + public global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? RunStepDeltaDetailsCodeObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDeltaDetailsCodeObject))] +#endif + public bool IsRunStepDeltaDetailsCodeObject => RunStepDeltaDetailsCodeObject != null; + + /// + /// + /// + public static implicit operator ToolCallsItem(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject value) => new ToolCallsItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject?(ToolCallsItem @this) => @this.RunStepDeltaDetailsCodeObject; + + /// + /// + /// + public ToolCallsItem(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? value) + { + RunStepDeltaDetailsCodeObject = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? RunStepDeltaDetailsFileSearchObject { get; init; } +#else + public global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? RunStepDeltaDetailsFileSearchObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDeltaDetailsFileSearchObject))] +#endif + public bool IsRunStepDeltaDetailsFileSearchObject => RunStepDeltaDetailsFileSearchObject != null; + + /// + /// + /// + public static implicit operator ToolCallsItem(global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject value) => new ToolCallsItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject?(ToolCallsItem @this) => @this.RunStepDeltaDetailsFileSearchObject; + + /// + /// + /// + public ToolCallsItem(global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? value) + { + RunStepDeltaDetailsFileSearchObject = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? RunStepDeltaDetailsFunctionObject { get; init; } +#else + public global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? RunStepDeltaDetailsFunctionObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDeltaDetailsFunctionObject))] +#endif + public bool IsRunStepDeltaDetailsFunctionObject => RunStepDeltaDetailsFunctionObject != null; + + /// + /// + /// + public static implicit operator ToolCallsItem(global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject value) => new ToolCallsItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject?(ToolCallsItem @this) => @this.RunStepDeltaDetailsFunctionObject; + + /// + /// + /// + public ToolCallsItem(global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? value) + { + RunStepDeltaDetailsFunctionObject = value; + } + + /// + /// + /// + public ToolCallsItem( + global::OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType? type, + global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? runStepDeltaDetailsCodeObject, + global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? runStepDeltaDetailsFileSearchObject, + global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? runStepDeltaDetailsFunctionObject + ) + { + Type = type; + + RunStepDeltaDetailsCodeObject = runStepDeltaDetailsCodeObject; + RunStepDeltaDetailsFileSearchObject = runStepDeltaDetailsFileSearchObject; + RunStepDeltaDetailsFunctionObject = runStepDeltaDetailsFunctionObject; + } + + /// + /// + /// + public object? Object => + RunStepDeltaDetailsFunctionObject as object ?? + RunStepDeltaDetailsFileSearchObject as object ?? + RunStepDeltaDetailsCodeObject as object + ; + + /// + /// + /// + public bool Validate() + { + return IsRunStepDeltaDetailsCodeObject && !IsRunStepDeltaDetailsFileSearchObject && !IsRunStepDeltaDetailsFunctionObject || !IsRunStepDeltaDetailsCodeObject && IsRunStepDeltaDetailsFileSearchObject && !IsRunStepDeltaDetailsFunctionObject || !IsRunStepDeltaDetailsCodeObject && !IsRunStepDeltaDetailsFileSearchObject && IsRunStepDeltaDetailsFunctionObject; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? runStepDeltaDetailsCodeObject = null, + global::System.Func? runStepDeltaDetailsFileSearchObject = null, + global::System.Func? runStepDeltaDetailsFunctionObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRunStepDeltaDetailsCodeObject && runStepDeltaDetailsCodeObject != null) + { + return runStepDeltaDetailsCodeObject(RunStepDeltaDetailsCodeObject!); + } + else if (IsRunStepDeltaDetailsFileSearchObject && runStepDeltaDetailsFileSearchObject != null) + { + return runStepDeltaDetailsFileSearchObject(RunStepDeltaDetailsFileSearchObject!); + } + else if (IsRunStepDeltaDetailsFunctionObject && runStepDeltaDetailsFunctionObject != null) + { + return runStepDeltaDetailsFunctionObject(RunStepDeltaDetailsFunctionObject!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? runStepDeltaDetailsCodeObject = null, + global::System.Action? runStepDeltaDetailsFileSearchObject = null, + global::System.Action? runStepDeltaDetailsFunctionObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRunStepDeltaDetailsCodeObject) + { + runStepDeltaDetailsCodeObject?.Invoke(RunStepDeltaDetailsCodeObject!); + } + else if (IsRunStepDeltaDetailsFileSearchObject) + { + runStepDeltaDetailsFileSearchObject?.Invoke(RunStepDeltaDetailsFileSearchObject!); + } + else if (IsRunStepDeltaDetailsFunctionObject) + { + runStepDeltaDetailsFunctionObject?.Invoke(RunStepDeltaDetailsFunctionObject!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + RunStepDeltaDetailsCodeObject, + typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject), + RunStepDeltaDetailsFileSearchObject, + typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject), + RunStepDeltaDetailsFunctionObject, + typeof(global::OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolCallsItem other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDeltaDetailsCodeObject, other.RunStepDeltaDetailsCodeObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDeltaDetailsFileSearchObject, other.RunStepDeltaDetailsFileSearchObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDeltaDetailsFunctionObject, other.RunStepDeltaDetailsFunctionObject) + ; + } + + /// + /// + /// + public static bool operator ==(ToolCallsItem obj1, ToolCallsItem obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolCallsItem obj1, ToolCallsItem obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolCallsItem o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ToolCallsItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ToolCallsItem), + jsonSerializerContext) as global::OpenAI.ToolCallsItem?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ToolCallsItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ToolCallsItem2.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ToolCallsItem2.g.cs new file mode 100644 index 00000000..58a6bb4f --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ToolCallsItem2.g.cs @@ -0,0 +1,331 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ToolCallsItem2 : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType? Type { get; } + + /// + /// Details of the Code Interpreter tool call the run step was involved in. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDetailsToolCallsCodeObject? RunStepDetailsCodeObject { get; init; } +#else + public global::OpenAI.RunStepDetailsToolCallsCodeObject? RunStepDetailsCodeObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDetailsCodeObject))] +#endif + public bool IsRunStepDetailsCodeObject => RunStepDetailsCodeObject != null; + + /// + /// + /// + public static implicit operator ToolCallsItem2(global::OpenAI.RunStepDetailsToolCallsCodeObject value) => new ToolCallsItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDetailsToolCallsCodeObject?(ToolCallsItem2 @this) => @this.RunStepDetailsCodeObject; + + /// + /// + /// + public ToolCallsItem2(global::OpenAI.RunStepDetailsToolCallsCodeObject? value) + { + RunStepDetailsCodeObject = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDetailsToolCallsFileSearchObject? RunStepDetailsFileSearchObject { get; init; } +#else + public global::OpenAI.RunStepDetailsToolCallsFileSearchObject? RunStepDetailsFileSearchObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDetailsFileSearchObject))] +#endif + public bool IsRunStepDetailsFileSearchObject => RunStepDetailsFileSearchObject != null; + + /// + /// + /// + public static implicit operator ToolCallsItem2(global::OpenAI.RunStepDetailsToolCallsFileSearchObject value) => new ToolCallsItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDetailsToolCallsFileSearchObject?(ToolCallsItem2 @this) => @this.RunStepDetailsFileSearchObject; + + /// + /// + /// + public ToolCallsItem2(global::OpenAI.RunStepDetailsToolCallsFileSearchObject? value) + { + RunStepDetailsFileSearchObject = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.RunStepDetailsToolCallsFunctionObject? RunStepDetailsFunctionObject { get; init; } +#else + public global::OpenAI.RunStepDetailsToolCallsFunctionObject? RunStepDetailsFunctionObject { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDetailsFunctionObject))] +#endif + public bool IsRunStepDetailsFunctionObject => RunStepDetailsFunctionObject != null; + + /// + /// + /// + public static implicit operator ToolCallsItem2(global::OpenAI.RunStepDetailsToolCallsFunctionObject value) => new ToolCallsItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.RunStepDetailsToolCallsFunctionObject?(ToolCallsItem2 @this) => @this.RunStepDetailsFunctionObject; + + /// + /// + /// + public ToolCallsItem2(global::OpenAI.RunStepDetailsToolCallsFunctionObject? value) + { + RunStepDetailsFunctionObject = value; + } + + /// + /// + /// + public ToolCallsItem2( + global::OpenAI.RunStepDetailsToolCallsObjectToolCallDiscriminatorType? type, + global::OpenAI.RunStepDetailsToolCallsCodeObject? runStepDetailsCodeObject, + global::OpenAI.RunStepDetailsToolCallsFileSearchObject? runStepDetailsFileSearchObject, + global::OpenAI.RunStepDetailsToolCallsFunctionObject? runStepDetailsFunctionObject + ) + { + Type = type; + + RunStepDetailsCodeObject = runStepDetailsCodeObject; + RunStepDetailsFileSearchObject = runStepDetailsFileSearchObject; + RunStepDetailsFunctionObject = runStepDetailsFunctionObject; + } + + /// + /// + /// + public object? Object => + RunStepDetailsFunctionObject as object ?? + RunStepDetailsFileSearchObject as object ?? + RunStepDetailsCodeObject as object + ; + + /// + /// + /// + public bool Validate() + { + return IsRunStepDetailsCodeObject && !IsRunStepDetailsFileSearchObject && !IsRunStepDetailsFunctionObject || !IsRunStepDetailsCodeObject && IsRunStepDetailsFileSearchObject && !IsRunStepDetailsFunctionObject || !IsRunStepDetailsCodeObject && !IsRunStepDetailsFileSearchObject && IsRunStepDetailsFunctionObject; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? runStepDetailsCodeObject = null, + global::System.Func? runStepDetailsFileSearchObject = null, + global::System.Func? runStepDetailsFunctionObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRunStepDetailsCodeObject && runStepDetailsCodeObject != null) + { + return runStepDetailsCodeObject(RunStepDetailsCodeObject!); + } + else if (IsRunStepDetailsFileSearchObject && runStepDetailsFileSearchObject != null) + { + return runStepDetailsFileSearchObject(RunStepDetailsFileSearchObject!); + } + else if (IsRunStepDetailsFunctionObject && runStepDetailsFunctionObject != null) + { + return runStepDetailsFunctionObject(RunStepDetailsFunctionObject!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? runStepDetailsCodeObject = null, + global::System.Action? runStepDetailsFileSearchObject = null, + global::System.Action? runStepDetailsFunctionObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRunStepDetailsCodeObject) + { + runStepDetailsCodeObject?.Invoke(RunStepDetailsCodeObject!); + } + else if (IsRunStepDetailsFileSearchObject) + { + runStepDetailsFileSearchObject?.Invoke(RunStepDetailsFileSearchObject!); + } + else if (IsRunStepDetailsFunctionObject) + { + runStepDetailsFunctionObject?.Invoke(RunStepDetailsFunctionObject!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + RunStepDetailsCodeObject, + typeof(global::OpenAI.RunStepDetailsToolCallsCodeObject), + RunStepDetailsFileSearchObject, + typeof(global::OpenAI.RunStepDetailsToolCallsFileSearchObject), + RunStepDetailsFunctionObject, + typeof(global::OpenAI.RunStepDetailsToolCallsFunctionObject), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolCallsItem2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDetailsCodeObject, other.RunStepDetailsCodeObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDetailsFileSearchObject, other.RunStepDetailsFileSearchObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDetailsFunctionObject, other.RunStepDetailsFunctionObject) + ; + } + + /// + /// + /// + public static bool operator ==(ToolCallsItem2 obj1, ToolCallsItem2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolCallsItem2 obj1, ToolCallsItem2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolCallsItem2 o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ToolCallsItem2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ToolCallsItem2), + jsonSerializerContext) as global::OpenAI.ToolCallsItem2?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ToolCallsItem2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem.g.cs new file mode 100644 index 00000000..883e2812 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem.g.cs @@ -0,0 +1,331 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ToolsItem : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.AssistantObjectToolDiscriminatorType? Type { get; } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsCode? AssistantCode { get; init; } +#else + public global::OpenAI.AssistantToolsCode? AssistantCode { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] +#endif + public bool IsAssistantCode => AssistantCode != null; + + /// + /// + /// + public static implicit operator ToolsItem(global::OpenAI.AssistantToolsCode value) => new ToolsItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsCode?(ToolsItem @this) => @this.AssistantCode; + + /// + /// + /// + public ToolsItem(global::OpenAI.AssistantToolsCode? value) + { + AssistantCode = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; init; } +#else + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] +#endif + public bool IsAssistantFileSearch => AssistantFileSearch != null; + + /// + /// + /// + public static implicit operator ToolsItem(global::OpenAI.AssistantToolsFileSearch value) => new ToolsItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFileSearch?(ToolsItem @this) => @this.AssistantFileSearch; + + /// + /// + /// + public ToolsItem(global::OpenAI.AssistantToolsFileSearch? value) + { + AssistantFileSearch = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; init; } +#else + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] +#endif + public bool IsAssistantFunction => AssistantFunction != null; + + /// + /// + /// + public static implicit operator ToolsItem(global::OpenAI.AssistantToolsFunction value) => new ToolsItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFunction?(ToolsItem @this) => @this.AssistantFunction; + + /// + /// + /// + public ToolsItem(global::OpenAI.AssistantToolsFunction? value) + { + AssistantFunction = value; + } + + /// + /// + /// + public ToolsItem( + global::OpenAI.AssistantObjectToolDiscriminatorType? type, + global::OpenAI.AssistantToolsCode? assistantCode, + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch, + global::OpenAI.AssistantToolsFunction? assistantFunction + ) + { + Type = type; + + AssistantCode = assistantCode; + AssistantFileSearch = assistantFileSearch; + AssistantFunction = assistantFunction; + } + + /// + /// + /// + public object? Object => + AssistantFunction as object ?? + AssistantFileSearch as object ?? + AssistantCode as object + ; + + /// + /// + /// + public bool Validate() + { + return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? assistantCode = null, + global::System.Func? assistantFileSearch = null, + global::System.Func? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode && assistantCode != null) + { + return assistantCode(AssistantCode!); + } + else if (IsAssistantFileSearch && assistantFileSearch != null) + { + return assistantFileSearch(AssistantFileSearch!); + } + else if (IsAssistantFunction && assistantFunction != null) + { + return assistantFunction(AssistantFunction!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? assistantCode = null, + global::System.Action? assistantFileSearch = null, + global::System.Action? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode) + { + assistantCode?.Invoke(AssistantCode!); + } + else if (IsAssistantFileSearch) + { + assistantFileSearch?.Invoke(AssistantFileSearch!); + } + else if (IsAssistantFunction) + { + assistantFunction?.Invoke(AssistantFunction!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AssistantCode, + typeof(global::OpenAI.AssistantToolsCode), + AssistantFileSearch, + typeof(global::OpenAI.AssistantToolsFileSearch), + AssistantFunction, + typeof(global::OpenAI.AssistantToolsFunction), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolsItem other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + ; + } + + /// + /// + /// + public static bool operator ==(ToolsItem obj1, ToolsItem obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolsItem obj1, ToolsItem obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolsItem o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ToolsItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ToolsItem), + jsonSerializerContext) as global::OpenAI.ToolsItem?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ToolsItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem2.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem2.g.cs new file mode 100644 index 00000000..bbbceca7 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem2.g.cs @@ -0,0 +1,331 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ToolsItem2 : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.CreateAssistantRequestToolDiscriminatorType? Type { get; } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsCode? AssistantCode { get; init; } +#else + public global::OpenAI.AssistantToolsCode? AssistantCode { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] +#endif + public bool IsAssistantCode => AssistantCode != null; + + /// + /// + /// + public static implicit operator ToolsItem2(global::OpenAI.AssistantToolsCode value) => new ToolsItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsCode?(ToolsItem2 @this) => @this.AssistantCode; + + /// + /// + /// + public ToolsItem2(global::OpenAI.AssistantToolsCode? value) + { + AssistantCode = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; init; } +#else + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] +#endif + public bool IsAssistantFileSearch => AssistantFileSearch != null; + + /// + /// + /// + public static implicit operator ToolsItem2(global::OpenAI.AssistantToolsFileSearch value) => new ToolsItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFileSearch?(ToolsItem2 @this) => @this.AssistantFileSearch; + + /// + /// + /// + public ToolsItem2(global::OpenAI.AssistantToolsFileSearch? value) + { + AssistantFileSearch = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; init; } +#else + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] +#endif + public bool IsAssistantFunction => AssistantFunction != null; + + /// + /// + /// + public static implicit operator ToolsItem2(global::OpenAI.AssistantToolsFunction value) => new ToolsItem2(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFunction?(ToolsItem2 @this) => @this.AssistantFunction; + + /// + /// + /// + public ToolsItem2(global::OpenAI.AssistantToolsFunction? value) + { + AssistantFunction = value; + } + + /// + /// + /// + public ToolsItem2( + global::OpenAI.CreateAssistantRequestToolDiscriminatorType? type, + global::OpenAI.AssistantToolsCode? assistantCode, + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch, + global::OpenAI.AssistantToolsFunction? assistantFunction + ) + { + Type = type; + + AssistantCode = assistantCode; + AssistantFileSearch = assistantFileSearch; + AssistantFunction = assistantFunction; + } + + /// + /// + /// + public object? Object => + AssistantFunction as object ?? + AssistantFileSearch as object ?? + AssistantCode as object + ; + + /// + /// + /// + public bool Validate() + { + return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? assistantCode = null, + global::System.Func? assistantFileSearch = null, + global::System.Func? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode && assistantCode != null) + { + return assistantCode(AssistantCode!); + } + else if (IsAssistantFileSearch && assistantFileSearch != null) + { + return assistantFileSearch(AssistantFileSearch!); + } + else if (IsAssistantFunction && assistantFunction != null) + { + return assistantFunction(AssistantFunction!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? assistantCode = null, + global::System.Action? assistantFileSearch = null, + global::System.Action? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode) + { + assistantCode?.Invoke(AssistantCode!); + } + else if (IsAssistantFileSearch) + { + assistantFileSearch?.Invoke(AssistantFileSearch!); + } + else if (IsAssistantFunction) + { + assistantFunction?.Invoke(AssistantFunction!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AssistantCode, + typeof(global::OpenAI.AssistantToolsCode), + AssistantFileSearch, + typeof(global::OpenAI.AssistantToolsFileSearch), + AssistantFunction, + typeof(global::OpenAI.AssistantToolsFunction), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolsItem2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + ; + } + + /// + /// + /// + public static bool operator ==(ToolsItem2 obj1, ToolsItem2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolsItem2 obj1, ToolsItem2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolsItem2 o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ToolsItem2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ToolsItem2), + jsonSerializerContext) as global::OpenAI.ToolsItem2?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ToolsItem2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem3.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem3.g.cs new file mode 100644 index 00000000..a3dac4b3 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem3.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ToolsItem3 : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType? Type { get; } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsCode? AssistantCode { get; init; } +#else + public global::OpenAI.AssistantToolsCode? AssistantCode { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] +#endif + public bool IsAssistantCode => AssistantCode != null; + + /// + /// + /// + public static implicit operator ToolsItem3(global::OpenAI.AssistantToolsCode value) => new ToolsItem3(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsCode?(ToolsItem3 @this) => @this.AssistantCode; + + /// + /// + /// + public ToolsItem3(global::OpenAI.AssistantToolsCode? value) + { + AssistantCode = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; init; } +#else + public global::OpenAI.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearchTypeOnly))] +#endif + public bool IsAssistantFileSearchTypeOnly => AssistantFileSearchTypeOnly != null; + + /// + /// + /// + public static implicit operator ToolsItem3(global::OpenAI.AssistantToolsFileSearchTypeOnly value) => new ToolsItem3(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFileSearchTypeOnly?(ToolsItem3 @this) => @this.AssistantFileSearchTypeOnly; + + /// + /// + /// + public ToolsItem3(global::OpenAI.AssistantToolsFileSearchTypeOnly? value) + { + AssistantFileSearchTypeOnly = value; + } + + /// + /// + /// + public ToolsItem3( + global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType? type, + global::OpenAI.AssistantToolsCode? assistantCode, + global::OpenAI.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly + ) + { + Type = type; + + AssistantCode = assistantCode; + AssistantFileSearchTypeOnly = assistantFileSearchTypeOnly; + } + + /// + /// + /// + public object? Object => + AssistantFileSearchTypeOnly as object ?? + AssistantCode as object + ; + + /// + /// + /// + public bool Validate() + { + return IsAssistantCode && !IsAssistantFileSearchTypeOnly || !IsAssistantCode && IsAssistantFileSearchTypeOnly; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? assistantCode = null, + global::System.Func? assistantFileSearchTypeOnly = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode && assistantCode != null) + { + return assistantCode(AssistantCode!); + } + else if (IsAssistantFileSearchTypeOnly && assistantFileSearchTypeOnly != null) + { + return assistantFileSearchTypeOnly(AssistantFileSearchTypeOnly!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? assistantCode = null, + global::System.Action? assistantFileSearchTypeOnly = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode) + { + assistantCode?.Invoke(AssistantCode!); + } + else if (IsAssistantFileSearchTypeOnly) + { + assistantFileSearchTypeOnly?.Invoke(AssistantFileSearchTypeOnly!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AssistantCode, + typeof(global::OpenAI.AssistantToolsCode), + AssistantFileSearchTypeOnly, + typeof(global::OpenAI.AssistantToolsFileSearchTypeOnly), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolsItem3 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearchTypeOnly, other.AssistantFileSearchTypeOnly) + ; + } + + /// + /// + /// + public static bool operator ==(ToolsItem3 obj1, ToolsItem3 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolsItem3 obj1, ToolsItem3 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolsItem3 o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ToolsItem3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ToolsItem3), + jsonSerializerContext) as global::OpenAI.ToolsItem3?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ToolsItem3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem4.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem4.g.cs new file mode 100644 index 00000000..14c82471 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem4.g.cs @@ -0,0 +1,331 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ToolsItem4 : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.CreateRunRequestToolDiscriminatorType? Type { get; } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsCode? AssistantCode { get; init; } +#else + public global::OpenAI.AssistantToolsCode? AssistantCode { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] +#endif + public bool IsAssistantCode => AssistantCode != null; + + /// + /// + /// + public static implicit operator ToolsItem4(global::OpenAI.AssistantToolsCode value) => new ToolsItem4(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsCode?(ToolsItem4 @this) => @this.AssistantCode; + + /// + /// + /// + public ToolsItem4(global::OpenAI.AssistantToolsCode? value) + { + AssistantCode = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; init; } +#else + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] +#endif + public bool IsAssistantFileSearch => AssistantFileSearch != null; + + /// + /// + /// + public static implicit operator ToolsItem4(global::OpenAI.AssistantToolsFileSearch value) => new ToolsItem4(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFileSearch?(ToolsItem4 @this) => @this.AssistantFileSearch; + + /// + /// + /// + public ToolsItem4(global::OpenAI.AssistantToolsFileSearch? value) + { + AssistantFileSearch = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; init; } +#else + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] +#endif + public bool IsAssistantFunction => AssistantFunction != null; + + /// + /// + /// + public static implicit operator ToolsItem4(global::OpenAI.AssistantToolsFunction value) => new ToolsItem4(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFunction?(ToolsItem4 @this) => @this.AssistantFunction; + + /// + /// + /// + public ToolsItem4(global::OpenAI.AssistantToolsFunction? value) + { + AssistantFunction = value; + } + + /// + /// + /// + public ToolsItem4( + global::OpenAI.CreateRunRequestToolDiscriminatorType? type, + global::OpenAI.AssistantToolsCode? assistantCode, + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch, + global::OpenAI.AssistantToolsFunction? assistantFunction + ) + { + Type = type; + + AssistantCode = assistantCode; + AssistantFileSearch = assistantFileSearch; + AssistantFunction = assistantFunction; + } + + /// + /// + /// + public object? Object => + AssistantFunction as object ?? + AssistantFileSearch as object ?? + AssistantCode as object + ; + + /// + /// + /// + public bool Validate() + { + return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? assistantCode = null, + global::System.Func? assistantFileSearch = null, + global::System.Func? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode && assistantCode != null) + { + return assistantCode(AssistantCode!); + } + else if (IsAssistantFileSearch && assistantFileSearch != null) + { + return assistantFileSearch(AssistantFileSearch!); + } + else if (IsAssistantFunction && assistantFunction != null) + { + return assistantFunction(AssistantFunction!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? assistantCode = null, + global::System.Action? assistantFileSearch = null, + global::System.Action? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode) + { + assistantCode?.Invoke(AssistantCode!); + } + else if (IsAssistantFileSearch) + { + assistantFileSearch?.Invoke(AssistantFileSearch!); + } + else if (IsAssistantFunction) + { + assistantFunction?.Invoke(AssistantFunction!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AssistantCode, + typeof(global::OpenAI.AssistantToolsCode), + AssistantFileSearch, + typeof(global::OpenAI.AssistantToolsFileSearch), + AssistantFunction, + typeof(global::OpenAI.AssistantToolsFunction), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolsItem4 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + ; + } + + /// + /// + /// + public static bool operator ==(ToolsItem4 obj1, ToolsItem4 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolsItem4 obj1, ToolsItem4 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolsItem4 o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ToolsItem4? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ToolsItem4), + jsonSerializerContext) as global::OpenAI.ToolsItem4?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ToolsItem4? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem5.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem5.g.cs new file mode 100644 index 00000000..eaa7086c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem5.g.cs @@ -0,0 +1,331 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ToolsItem5 : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType? Type { get; } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsCode? AssistantCode { get; init; } +#else + public global::OpenAI.AssistantToolsCode? AssistantCode { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] +#endif + public bool IsAssistantCode => AssistantCode != null; + + /// + /// + /// + public static implicit operator ToolsItem5(global::OpenAI.AssistantToolsCode value) => new ToolsItem5(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsCode?(ToolsItem5 @this) => @this.AssistantCode; + + /// + /// + /// + public ToolsItem5(global::OpenAI.AssistantToolsCode? value) + { + AssistantCode = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; init; } +#else + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] +#endif + public bool IsAssistantFileSearch => AssistantFileSearch != null; + + /// + /// + /// + public static implicit operator ToolsItem5(global::OpenAI.AssistantToolsFileSearch value) => new ToolsItem5(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFileSearch?(ToolsItem5 @this) => @this.AssistantFileSearch; + + /// + /// + /// + public ToolsItem5(global::OpenAI.AssistantToolsFileSearch? value) + { + AssistantFileSearch = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; init; } +#else + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] +#endif + public bool IsAssistantFunction => AssistantFunction != null; + + /// + /// + /// + public static implicit operator ToolsItem5(global::OpenAI.AssistantToolsFunction value) => new ToolsItem5(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFunction?(ToolsItem5 @this) => @this.AssistantFunction; + + /// + /// + /// + public ToolsItem5(global::OpenAI.AssistantToolsFunction? value) + { + AssistantFunction = value; + } + + /// + /// + /// + public ToolsItem5( + global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType? type, + global::OpenAI.AssistantToolsCode? assistantCode, + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch, + global::OpenAI.AssistantToolsFunction? assistantFunction + ) + { + Type = type; + + AssistantCode = assistantCode; + AssistantFileSearch = assistantFileSearch; + AssistantFunction = assistantFunction; + } + + /// + /// + /// + public object? Object => + AssistantFunction as object ?? + AssistantFileSearch as object ?? + AssistantCode as object + ; + + /// + /// + /// + public bool Validate() + { + return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? assistantCode = null, + global::System.Func? assistantFileSearch = null, + global::System.Func? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode && assistantCode != null) + { + return assistantCode(AssistantCode!); + } + else if (IsAssistantFileSearch && assistantFileSearch != null) + { + return assistantFileSearch(AssistantFileSearch!); + } + else if (IsAssistantFunction && assistantFunction != null) + { + return assistantFunction(AssistantFunction!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? assistantCode = null, + global::System.Action? assistantFileSearch = null, + global::System.Action? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode) + { + assistantCode?.Invoke(AssistantCode!); + } + else if (IsAssistantFileSearch) + { + assistantFileSearch?.Invoke(AssistantFileSearch!); + } + else if (IsAssistantFunction) + { + assistantFunction?.Invoke(AssistantFunction!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AssistantCode, + typeof(global::OpenAI.AssistantToolsCode), + AssistantFileSearch, + typeof(global::OpenAI.AssistantToolsFileSearch), + AssistantFunction, + typeof(global::OpenAI.AssistantToolsFunction), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolsItem5 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + ; + } + + /// + /// + /// + public static bool operator ==(ToolsItem5 obj1, ToolsItem5 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolsItem5 obj1, ToolsItem5 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolsItem5 o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ToolsItem5? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ToolsItem5), + jsonSerializerContext) as global::OpenAI.ToolsItem5?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ToolsItem5? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem6.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem6.g.cs new file mode 100644 index 00000000..b500d1f2 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem6.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ToolsItem6 : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.MessageObjectAttachmentToolDiscriminatorType? Type { get; } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsCode? AssistantCode { get; init; } +#else + public global::OpenAI.AssistantToolsCode? AssistantCode { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] +#endif + public bool IsAssistantCode => AssistantCode != null; + + /// + /// + /// + public static implicit operator ToolsItem6(global::OpenAI.AssistantToolsCode value) => new ToolsItem6(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsCode?(ToolsItem6 @this) => @this.AssistantCode; + + /// + /// + /// + public ToolsItem6(global::OpenAI.AssistantToolsCode? value) + { + AssistantCode = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; init; } +#else + public global::OpenAI.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearchTypeOnly))] +#endif + public bool IsAssistantFileSearchTypeOnly => AssistantFileSearchTypeOnly != null; + + /// + /// + /// + public static implicit operator ToolsItem6(global::OpenAI.AssistantToolsFileSearchTypeOnly value) => new ToolsItem6(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFileSearchTypeOnly?(ToolsItem6 @this) => @this.AssistantFileSearchTypeOnly; + + /// + /// + /// + public ToolsItem6(global::OpenAI.AssistantToolsFileSearchTypeOnly? value) + { + AssistantFileSearchTypeOnly = value; + } + + /// + /// + /// + public ToolsItem6( + global::OpenAI.MessageObjectAttachmentToolDiscriminatorType? type, + global::OpenAI.AssistantToolsCode? assistantCode, + global::OpenAI.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly + ) + { + Type = type; + + AssistantCode = assistantCode; + AssistantFileSearchTypeOnly = assistantFileSearchTypeOnly; + } + + /// + /// + /// + public object? Object => + AssistantFileSearchTypeOnly as object ?? + AssistantCode as object + ; + + /// + /// + /// + public bool Validate() + { + return IsAssistantCode && !IsAssistantFileSearchTypeOnly || !IsAssistantCode && IsAssistantFileSearchTypeOnly; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? assistantCode = null, + global::System.Func? assistantFileSearchTypeOnly = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode && assistantCode != null) + { + return assistantCode(AssistantCode!); + } + else if (IsAssistantFileSearchTypeOnly && assistantFileSearchTypeOnly != null) + { + return assistantFileSearchTypeOnly(AssistantFileSearchTypeOnly!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? assistantCode = null, + global::System.Action? assistantFileSearchTypeOnly = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode) + { + assistantCode?.Invoke(AssistantCode!); + } + else if (IsAssistantFileSearchTypeOnly) + { + assistantFileSearchTypeOnly?.Invoke(AssistantFileSearchTypeOnly!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AssistantCode, + typeof(global::OpenAI.AssistantToolsCode), + AssistantFileSearchTypeOnly, + typeof(global::OpenAI.AssistantToolsFileSearchTypeOnly), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolsItem6 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearchTypeOnly, other.AssistantFileSearchTypeOnly) + ; + } + + /// + /// + /// + public static bool operator ==(ToolsItem6 obj1, ToolsItem6 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolsItem6 obj1, ToolsItem6 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolsItem6 o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ToolsItem6? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ToolsItem6), + jsonSerializerContext) as global::OpenAI.ToolsItem6?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ToolsItem6? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem7.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem7.g.cs new file mode 100644 index 00000000..d0ca7548 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem7.g.cs @@ -0,0 +1,331 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ToolsItem7 : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.ModifyAssistantRequestToolDiscriminatorType? Type { get; } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsCode? AssistantCode { get; init; } +#else + public global::OpenAI.AssistantToolsCode? AssistantCode { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] +#endif + public bool IsAssistantCode => AssistantCode != null; + + /// + /// + /// + public static implicit operator ToolsItem7(global::OpenAI.AssistantToolsCode value) => new ToolsItem7(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsCode?(ToolsItem7 @this) => @this.AssistantCode; + + /// + /// + /// + public ToolsItem7(global::OpenAI.AssistantToolsCode? value) + { + AssistantCode = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; init; } +#else + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] +#endif + public bool IsAssistantFileSearch => AssistantFileSearch != null; + + /// + /// + /// + public static implicit operator ToolsItem7(global::OpenAI.AssistantToolsFileSearch value) => new ToolsItem7(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFileSearch?(ToolsItem7 @this) => @this.AssistantFileSearch; + + /// + /// + /// + public ToolsItem7(global::OpenAI.AssistantToolsFileSearch? value) + { + AssistantFileSearch = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; init; } +#else + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] +#endif + public bool IsAssistantFunction => AssistantFunction != null; + + /// + /// + /// + public static implicit operator ToolsItem7(global::OpenAI.AssistantToolsFunction value) => new ToolsItem7(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFunction?(ToolsItem7 @this) => @this.AssistantFunction; + + /// + /// + /// + public ToolsItem7(global::OpenAI.AssistantToolsFunction? value) + { + AssistantFunction = value; + } + + /// + /// + /// + public ToolsItem7( + global::OpenAI.ModifyAssistantRequestToolDiscriminatorType? type, + global::OpenAI.AssistantToolsCode? assistantCode, + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch, + global::OpenAI.AssistantToolsFunction? assistantFunction + ) + { + Type = type; + + AssistantCode = assistantCode; + AssistantFileSearch = assistantFileSearch; + AssistantFunction = assistantFunction; + } + + /// + /// + /// + public object? Object => + AssistantFunction as object ?? + AssistantFileSearch as object ?? + AssistantCode as object + ; + + /// + /// + /// + public bool Validate() + { + return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? assistantCode = null, + global::System.Func? assistantFileSearch = null, + global::System.Func? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode && assistantCode != null) + { + return assistantCode(AssistantCode!); + } + else if (IsAssistantFileSearch && assistantFileSearch != null) + { + return assistantFileSearch(AssistantFileSearch!); + } + else if (IsAssistantFunction && assistantFunction != null) + { + return assistantFunction(AssistantFunction!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? assistantCode = null, + global::System.Action? assistantFileSearch = null, + global::System.Action? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode) + { + assistantCode?.Invoke(AssistantCode!); + } + else if (IsAssistantFileSearch) + { + assistantFileSearch?.Invoke(AssistantFileSearch!); + } + else if (IsAssistantFunction) + { + assistantFunction?.Invoke(AssistantFunction!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AssistantCode, + typeof(global::OpenAI.AssistantToolsCode), + AssistantFileSearch, + typeof(global::OpenAI.AssistantToolsFileSearch), + AssistantFunction, + typeof(global::OpenAI.AssistantToolsFunction), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolsItem7 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + ; + } + + /// + /// + /// + public static bool operator ==(ToolsItem7 obj1, ToolsItem7 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolsItem7 obj1, ToolsItem7 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolsItem7 o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ToolsItem7? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ToolsItem7), + jsonSerializerContext) as global::OpenAI.ToolsItem7?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ToolsItem7? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem8.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem8.g.cs new file mode 100644 index 00000000..ddcbc8f9 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ToolsItem8.g.cs @@ -0,0 +1,331 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ToolsItem8 : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.RunObjectToolDiscriminatorType? Type { get; } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsCode? AssistantCode { get; init; } +#else + public global::OpenAI.AssistantToolsCode? AssistantCode { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] +#endif + public bool IsAssistantCode => AssistantCode != null; + + /// + /// + /// + public static implicit operator ToolsItem8(global::OpenAI.AssistantToolsCode value) => new ToolsItem8(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsCode?(ToolsItem8 @this) => @this.AssistantCode; + + /// + /// + /// + public ToolsItem8(global::OpenAI.AssistantToolsCode? value) + { + AssistantCode = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; init; } +#else + public global::OpenAI.AssistantToolsFileSearch? AssistantFileSearch { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] +#endif + public bool IsAssistantFileSearch => AssistantFileSearch != null; + + /// + /// + /// + public static implicit operator ToolsItem8(global::OpenAI.AssistantToolsFileSearch value) => new ToolsItem8(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFileSearch?(ToolsItem8 @this) => @this.AssistantFileSearch; + + /// + /// + /// + public ToolsItem8(global::OpenAI.AssistantToolsFileSearch? value) + { + AssistantFileSearch = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; init; } +#else + public global::OpenAI.AssistantToolsFunction? AssistantFunction { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] +#endif + public bool IsAssistantFunction => AssistantFunction != null; + + /// + /// + /// + public static implicit operator ToolsItem8(global::OpenAI.AssistantToolsFunction value) => new ToolsItem8(value); + + /// + /// + /// + public static implicit operator global::OpenAI.AssistantToolsFunction?(ToolsItem8 @this) => @this.AssistantFunction; + + /// + /// + /// + public ToolsItem8(global::OpenAI.AssistantToolsFunction? value) + { + AssistantFunction = value; + } + + /// + /// + /// + public ToolsItem8( + global::OpenAI.RunObjectToolDiscriminatorType? type, + global::OpenAI.AssistantToolsCode? assistantCode, + global::OpenAI.AssistantToolsFileSearch? assistantFileSearch, + global::OpenAI.AssistantToolsFunction? assistantFunction + ) + { + Type = type; + + AssistantCode = assistantCode; + AssistantFileSearch = assistantFileSearch; + AssistantFunction = assistantFunction; + } + + /// + /// + /// + public object? Object => + AssistantFunction as object ?? + AssistantFileSearch as object ?? + AssistantCode as object + ; + + /// + /// + /// + public bool Validate() + { + return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? assistantCode = null, + global::System.Func? assistantFileSearch = null, + global::System.Func? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode && assistantCode != null) + { + return assistantCode(AssistantCode!); + } + else if (IsAssistantFileSearch && assistantFileSearch != null) + { + return assistantFileSearch(AssistantFileSearch!); + } + else if (IsAssistantFunction && assistantFunction != null) + { + return assistantFunction(AssistantFunction!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? assistantCode = null, + global::System.Action? assistantFileSearch = null, + global::System.Action? assistantFunction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAssistantCode) + { + assistantCode?.Invoke(AssistantCode!); + } + else if (IsAssistantFileSearch) + { + assistantFileSearch?.Invoke(AssistantFileSearch!); + } + else if (IsAssistantFunction) + { + assistantFunction?.Invoke(AssistantFunction!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AssistantCode, + typeof(global::OpenAI.AssistantToolsCode), + AssistantFileSearch, + typeof(global::OpenAI.AssistantToolsFileSearch), + AssistantFunction, + typeof(global::OpenAI.AssistantToolsFunction), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolsItem8 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + ; + } + + /// + /// + /// + public static bool operator ==(ToolsItem8 obj1, ToolsItem8 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolsItem8 obj1, ToolsItem8 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolsItem8 o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ToolsItem8? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ToolsItem8), + jsonSerializerContext) as global::OpenAI.ToolsItem8?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ToolsItem8? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObject.g.cs index 9def1e8c..0f465586 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObject.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObject.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace OpenAI @@ -65,8 +63,8 @@ public sealed partial class VectorStoreFileObject /// The strategy used to chunk the file. /// [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.OneOfJsonConverterFactory2))] - public global::OpenAI.OneOf? ChunkingStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.VectorStoreFileObjectChunkingStrategyJsonConverter))] + public global::OpenAI.VectorStoreFileObjectChunkingStrategy? ChunkingStrategy { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObjectChunkingStrategy.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObjectChunkingStrategy.g.cs new file mode 100644 index 00000000..9fd8e9a6 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObjectChunkingStrategy.g.cs @@ -0,0 +1,280 @@ +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// The strategy used to chunk the file. + /// + public readonly partial struct VectorStoreFileObjectChunkingStrategy : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType? Type { get; } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::OpenAI.StaticChunkingStrategyResponseParam? StaticResponseParam { get; init; } +#else + public global::OpenAI.StaticChunkingStrategyResponseParam? StaticResponseParam { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StaticResponseParam))] +#endif + public bool IsStaticResponseParam => StaticResponseParam != null; + + /// + /// + /// + public static implicit operator VectorStoreFileObjectChunkingStrategy(global::OpenAI.StaticChunkingStrategyResponseParam value) => new VectorStoreFileObjectChunkingStrategy(value); + + /// + /// + /// + public static implicit operator global::OpenAI.StaticChunkingStrategyResponseParam?(VectorStoreFileObjectChunkingStrategy @this) => @this.StaticResponseParam; + + /// + /// + /// + public VectorStoreFileObjectChunkingStrategy(global::OpenAI.StaticChunkingStrategyResponseParam? value) + { + StaticResponseParam = value; + } + + /// + /// This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.OtherChunkingStrategyResponseParam? OtherResponseParam { get; init; } +#else + public global::OpenAI.OtherChunkingStrategyResponseParam? OtherResponseParam { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OtherResponseParam))] +#endif + public bool IsOtherResponseParam => OtherResponseParam != null; + + /// + /// + /// + public static implicit operator VectorStoreFileObjectChunkingStrategy(global::OpenAI.OtherChunkingStrategyResponseParam value) => new VectorStoreFileObjectChunkingStrategy(value); + + /// + /// + /// + public static implicit operator global::OpenAI.OtherChunkingStrategyResponseParam?(VectorStoreFileObjectChunkingStrategy @this) => @this.OtherResponseParam; + + /// + /// + /// + public VectorStoreFileObjectChunkingStrategy(global::OpenAI.OtherChunkingStrategyResponseParam? value) + { + OtherResponseParam = value; + } + + /// + /// + /// + public VectorStoreFileObjectChunkingStrategy( + global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType? type, + global::OpenAI.StaticChunkingStrategyResponseParam? staticResponseParam, + global::OpenAI.OtherChunkingStrategyResponseParam? otherResponseParam + ) + { + Type = type; + + StaticResponseParam = staticResponseParam; + OtherResponseParam = otherResponseParam; + } + + /// + /// + /// + public object? Object => + OtherResponseParam as object ?? + StaticResponseParam as object + ; + + /// + /// + /// + public bool Validate() + { + return IsStaticResponseParam && !IsOtherResponseParam || !IsStaticResponseParam && IsOtherResponseParam; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? staticResponseParam = null, + global::System.Func? otherResponseParam = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsStaticResponseParam && staticResponseParam != null) + { + return staticResponseParam(StaticResponseParam!); + } + else if (IsOtherResponseParam && otherResponseParam != null) + { + return otherResponseParam(OtherResponseParam!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? staticResponseParam = null, + global::System.Action? otherResponseParam = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsStaticResponseParam) + { + staticResponseParam?.Invoke(StaticResponseParam!); + } + else if (IsOtherResponseParam) + { + otherResponseParam?.Invoke(OtherResponseParam!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + StaticResponseParam, + typeof(global::OpenAI.StaticChunkingStrategyResponseParam), + OtherResponseParam, + typeof(global::OpenAI.OtherChunkingStrategyResponseParam), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(VectorStoreFileObjectChunkingStrategy other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(StaticResponseParam, other.StaticResponseParam) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OtherResponseParam, other.OtherResponseParam) + ; + } + + /// + /// + /// + public static bool operator ==(VectorStoreFileObjectChunkingStrategy obj1, VectorStoreFileObjectChunkingStrategy obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(VectorStoreFileObjectChunkingStrategy obj1, VectorStoreFileObjectChunkingStrategy obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is VectorStoreFileObjectChunkingStrategy o && Equals(o); + } + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.VectorStoreFileObjectChunkingStrategy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.VectorStoreFileObjectChunkingStrategy), + jsonSerializerContext) as global::OpenAI.VectorStoreFileObjectChunkingStrategy?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.VectorStoreFileObjectChunkingStrategy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObjectChunkingStrategyDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObjectChunkingStrategyDiscriminator.g.cs new file mode 100644 index 00000000..a2e0caa4 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObjectChunkingStrategyDiscriminator.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class VectorStoreFileObjectChunkingStrategyDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.VectorStoreFileObjectChunkingStrategyDiscriminatorTypeJsonConverter))] + public global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminator), + jsonSerializerContext) as global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObjectChunkingStrategyDiscriminatorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObjectChunkingStrategyDiscriminatorType.g.cs new file mode 100644 index 00000000..57290812 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.VectorStoreFileObjectChunkingStrategyDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum VectorStoreFileObjectChunkingStrategyDiscriminatorType + { + /// + /// + /// + Static, + /// + /// + /// + Other, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VectorStoreFileObjectChunkingStrategyDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VectorStoreFileObjectChunkingStrategyDiscriminatorType value) + { + return value switch + { + VectorStoreFileObjectChunkingStrategyDiscriminatorType.Static => "static", + VectorStoreFileObjectChunkingStrategyDiscriminatorType.Other => "other", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VectorStoreFileObjectChunkingStrategyDiscriminatorType? ToEnum(string value) + { + return value switch + { + "static" => VectorStoreFileObjectChunkingStrategyDiscriminatorType.Static, + "other" => VectorStoreFileObjectChunkingStrategyDiscriminatorType.Other, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs b/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs index b002870f..00e105cb 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs @@ -133,7 +133,7 @@ partial void ProcessCreateModerationResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateModerationAsync( - global::OpenAI.OneOf, global::System.Collections.Generic.IList>> input, + global::OpenAI.OneOf, global::System.Collections.Generic.IList> input, global::OpenAI.AnyOf? model = default, global::System.Threading.CancellationToken cancellationToken = default) { diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs index 54ecfae9..c3e38129 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs @@ -138,7 +138,7 @@ partial void ProcessCreateVectorStoreResponseContent( global::System.Collections.Generic.IList? fileIds = default, string? name = default, global::OpenAI.VectorStoreExpirationAfter? expiresAfter = default, - global::OpenAI.OneOf? chunkingStrategy = default, + global::OpenAI.CreateVectorStoreRequestChunkingStrategy? chunkingStrategy = default, object? metadata = default, global::System.Threading.CancellationToken cancellationToken = default) {